- Timestamp:
- 06/08/09 21:12:46 (3 years ago)
- Children:
- bae014d9f22e13f6115d53d154e6489f20ae00e4
- Parents:
- 5987af1b79b0c1fbd4aa9d30a53ec6879853ece3
- git-committer:
- Neutron Soutmun <neo.neutron@…> (06/08/09 21:12:46)
- Files:
-
- 1 modified
-
src/rh-task-bandwidth.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/rh-task-bandwidth.c
r2f0141c r927d0c7 282 282 283 283 // Formating the bandwidth request 284 s printf(bw_req.ip, "%s", idtoip(vs->v_map, req->id));285 s printf(bw_req.bandwidth_max_down, "%lu",286 member->bandwidth_max_down);287 s printf(bw_req.bandwidth_max_up, "%lu",288 member->bandwidth_max_up);284 snprintf(bw_req.ip, sizeof (bw_req.ip), "%s", idtoip(vs->v_map, req->id)); 285 snprintf(bw_req.bandwidth_max_down, sizeof (bw_req.bandwidth_max_down), 286 "%lu", member->bandwidth_max_down); 287 snprintf(bw_req.bandwidth_max_up, sizeof (bw_req.bandwidth_max_up), "%lu", 288 member->bandwidth_max_up); 289 289 290 290 while (max_try > 0) { 291 291 slot_id = _get_slot_id(); 292 s printf(bw_req.slot_id, "%d", slot_id);292 snprintf(bw_req.slot_id, sizeof (bw_req.slot_id), "%d", slot_id); 293 293 if (bandwidth_add(vs, &bw_req) == 0) 294 294 break; … … 328 328 return 0; 329 329 330 s printf(bw_req.slot_id, "%d", slot_id);330 snprintf(bw_req.slot_id, sizeof (bw_req.slot_id), "%d", slot_id); 331 331 332 332 if (bandwidth_del(vs, &bw_req) == 0) {
