Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions examples/xmlrpc/calls.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ struct xmlrpc_entry_s get_device_stats =

static int calls_get_device_stats(struct xmlrpc_s *xmlcall)
{
char username[80];
char password[80];
char lastCommand[80];
char curState[80];
char username[CONFIG_XMLRPC_STRINGSIZE + 1];
char password[CONFIG_XMLRPC_STRINGSIZE + 1];
char lastcmd[CONFIG_XMLRPC_STRINGSIZE + 1];
char curstate[CONFIG_XMLRPC_STRINGSIZE + 1];
int request = 0;
int status;
int ret;
Expand Down Expand Up @@ -105,13 +105,13 @@ static int calls_get_device_stats(struct xmlrpc_s *xmlcall)
/* Dummy up some data... */

status = 1;
strlcpy(lastCommand, "reboot", sizeof(lastCommand));
strlcpy(curState, "Normal Operation", sizeof(curState));
strlcpy(lastcmd, "reboot", sizeof(lastcmd));
strlcpy(curstate, "Normal Operation", sizeof(curstate));

ret = xmlrpc_buildresponse(xmlcall, "{iss}",
"status", status,
"lastCommand", lastCommand,
"currentState", curState);
"lastCommand", lastcmd,
"currentState", curstate);
}

return ret;
Expand Down
Loading