wmc: global mode command is 3 bytes not 2

This commit is contained in:
Dan Williams
2012-01-20 14:54:02 -06:00
parent 1ae2381e5a
commit 85a7575717
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -354,14 +354,14 @@ wmc_cmd_network_info_result (const char *buf, size_t buflen)
size_t
wmc_cmd_get_global_mode_new (char *buf, size_t buflen)
{
WmcCmdHeader *cmd = (WmcCmdHeader *) buf;
WmcCmdGetGlobalMode *cmd = (WmcCmdGetGlobalMode *) buf;
wmc_return_val_if_fail (buf != NULL, 0);
wmc_return_val_if_fail (buflen >= sizeof (*cmd), 0);
memset (cmd, 0, sizeof (*cmd));
cmd->marker = WMC_CMD_MARKER;
cmd->cmd = WMC_CMD_GET_GLOBAL_MODE;
cmd->hdr.marker = WMC_CMD_MARKER;
cmd->hdr.cmd = WMC_CMD_GET_GLOBAL_MODE;
return sizeof (*cmd);
}
+1 -1
View File
@@ -443,7 +443,7 @@ test_com_get_global_mode (void *f, void *data)
size_t reply_len;
len = wmc_cmd_get_global_mode_new (buf, sizeof (buf));
g_assert (len == 2);
g_assert (len == 3);
/* Send the command */
success = send_command (d, buf, sizeof (buf), len);