- Timestamp:
- Oct 27, 2010 10:31:41 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageDHCPServer.cpp
r32701 r33489 279 279 int handleDHCPServer(HandlerArg *a) 280 280 { 281 int result = 0;282 281 if (a->argc < 1) 283 282 return errorSyntax(USAGE_DHCPSERVER, "Not enough parameters"); 284 283 285 for (int i = 0; i < a->argc; i++) 286 { 287 if (strcmp(a->argv[i], "modify") == 0) 288 { 289 int cProcessed; 290 result = handleOp(a, OP_MODIFY, i+1, &cProcessed); 291 break; 292 } 293 else if (strcmp(a->argv[i], "add") == 0) 294 { 295 int cProcessed; 296 result = handleOp(a, OP_ADD, i+1, &cProcessed); 297 break; 298 } 299 else if (strcmp(a->argv[i], "remove") == 0) 300 { 301 int cProcessed; 302 result = handleOp(a, OP_REMOVE, i+1, &cProcessed); 303 break; 304 } 305 else 306 { 307 result = errorSyntax(USAGE_DHCPSERVER, "Invalid parameter '%s'", Utf8Str(a->argv[i]).c_str()); 308 break; 309 } 310 } 284 int result; 285 int cProcessed; 286 if (strcmp(a->argv[0], "modify") == 0) 287 result = handleOp(a, OP_MODIFY, 1, &cProcessed); 288 else if (strcmp(a->argv[0], "add") == 0) 289 result = handleOp(a, OP_ADD, 1, &cProcessed); 290 else if (strcmp(a->argv[0], "remove") == 0) 291 result = handleOp(a, OP_REMOVE, 1, &cProcessed); 292 else 293 result = errorSyntax(USAGE_DHCPSERVER, "Invalid parameter '%s'", Utf8Str(a->argv[0]).c_str()); 311 294 312 295 return result;
Note:
See TracChangeset
for help on using the changeset viewer.