Changeset 714 for trunk/daemon/src/get.c
- Timestamp:
- 03/08/10 19:49:12 (2 years ago)
- Files:
-
- 1 modified
-
trunk/daemon/src/get.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/daemon/src/get.c
r708 r714 465 465 response = ovcp_response_new(); 466 466 467 ovcp_response_struct_new(response);468 469 467 while(cgroup_params[i] != NULL) 470 468 { … … 473 471 if(file_exist(path)) 474 472 { 475 value = file_read(path); 476 473 ovcp_response_struct_new(response); 474 475 ovcp_response_struct_add_string(response, "name", cgroup_params[i]); 476 477 value = file_read(path); 477 478 if(value != NULL) 478 479 { 479 480 trim_string(value); 480 ovcp_response_struct_add_string(response, cgroup_params[i], value);481 ovcp_response_struct_add_string(response, "value", value); 481 482 free(value); 482 483 } 484 else 485 { 486 ovcp_response_struct_add_string(response, "value", ""); 487 } 488 489 ovcp_response_struct_end(response); 483 490 } 484 491 485 492 i++; 486 493 } 487 488 ovcp_response_struct_end(response);489 494 490 495 return response;
