aboutsummaryrefslogtreecommitdiff
path: root/libqcdm/src/commands.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2010-02-22 10:52:59 -0800
committerDan Williams <dcbw@redhat.com>2010-02-22 10:52:59 -0800
commit0f9d4d2a1ac3414b25c71f736c5b1293e1595721 (patch)
tree4d7fb6885eab580005a5608cd44dbda1d757cb00 /libqcdm/src/commands.c
parentf5d1a9b40038c4c81b361a089b0753d149b3107c (diff)
qcdm: fix QCDM packet decapsulation
Rename and document the encapsulate/decapsulate functions, CRC-check the incoming packet, and make callers aware of the difference in how big the decapsulated packet is versus how many bytes they should discard from the buffer (since the decapsulated packet is at least 3 bytes shorter than the incoming packet due to the CRC + framing).
Diffstat (limited to 'libqcdm/src/commands.c')
-rw-r--r--libqcdm/src/commands.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libqcdm/src/commands.c b/libqcdm/src/commands.c
index 4e4af4b2..a3052007 100644
--- a/libqcdm/src/commands.c
+++ b/libqcdm/src/commands.c
@@ -61,7 +61,7 @@ qcdm_cmd_version_info_new (char *buf, gsize len, GError **error)
memset (cmd, 0, sizeof (cmd));
cmd->code = DIAG_CMD_VERSION_INFO;
- return dm_prepare_buffer (cmdbuf, sizeof (*cmd), sizeof (cmdbuf), buf, len);
+ return dm_encapsulate_buffer (cmdbuf, sizeof (*cmd), sizeof (cmdbuf), buf, len);
}
QCDMResult *