add IPC command to modify device info on the server.
This commit is contained in:
@@ -108,6 +108,17 @@ int AQH_Tool_GetDevices(GWEN_DB_NODE *dbGlobalArgs, int argc, char **argv)
|
||||
I18S("Specify service password"),
|
||||
I18S("Specify service password")
|
||||
},
|
||||
{
|
||||
0, /* flags */
|
||||
GWEN_ArgsType_Int, /* type */
|
||||
"printHeader", /* name */
|
||||
0, /* minnum */
|
||||
1, /* maxnum */
|
||||
"H", /* short option */
|
||||
"printheader", /* long option */
|
||||
I18S("Print header if given"),
|
||||
I18S("Print header if given")
|
||||
},
|
||||
{
|
||||
GWEN_ARGS_FLAGS_HELP | GWEN_ARGS_FLAGS_LAST, /* flags */
|
||||
GWEN_ArgsType_Int, /* type */
|
||||
@@ -153,8 +164,10 @@ int _doGetDevices(GWEN_DB_NODE *dbArgs)
|
||||
GWEN_MSG_ENDPOINT *epTcp;
|
||||
int timeoutInSeconds;
|
||||
GWEN_MSG *msg;
|
||||
int printHeader;
|
||||
|
||||
timeoutInSeconds=GWEN_DB_GetIntValue(dbArgs, "timeout", 0, 5);
|
||||
printHeader=GWEN_DB_GetIntValue(dbArgs, "printHeader", 0, 0);
|
||||
|
||||
epTcp=Utils_OpenConnection(dbArgs, 0, timeoutInSeconds);
|
||||
if (epTcp==NULL) {
|
||||
@@ -185,7 +198,8 @@ int _doGetDevices(GWEN_DB_NODE *dbArgs)
|
||||
|
||||
device=AQH_Device_List_First(deviceList);
|
||||
while(device) {
|
||||
Utils_PrintDevice(device);
|
||||
Utils_PrintDevice(device, printHeader);
|
||||
printHeader=0;
|
||||
device=AQH_Device_List_Next(device);
|
||||
}
|
||||
AQH_Device_List_free(deviceList);
|
||||
|
||||
Reference in New Issue
Block a user