diff options
author | Dan Williams <dcbw@redhat.com> | 2012-01-18 17:02:48 -0600 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2012-01-18 17:10:23 -0600 |
commit | 04e87e70ff629309413c7426d97457e5c58e19fe (patch) | |
tree | e4bb0f68fc68e8617430385adad59b092260c2be /libqcdm/tests/test-qcdm-com.c | |
parent | e2306a0dd5958ee9fef7305c6e41a0595bbeb3cc (diff) | |
download | ModemManager-04e87e70ff629309413c7426d97457e5c58e19fe.tar.gz |
qcdm: some devices do implement SW_VERSION
Like the MF627 for some reason. Also, the format appears to be
more like the DM_CMD_VERSION_INFO response where at least the
comp_date and comp_time fields are the same size as
VERSION_INFO, just with some padding between.
Diffstat (limited to 'libqcdm/tests/test-qcdm-com.c')
-rw-r--r-- | libqcdm/tests/test-qcdm-com.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/libqcdm/tests/test-qcdm-com.c b/libqcdm/tests/test-qcdm-com.c index d294bae9c..21313ed77 100644 --- a/libqcdm/tests/test-qcdm-com.c +++ b/libqcdm/tests/test-qcdm-com.c @@ -833,6 +833,7 @@ test_com_sw_version (void *f, void *data) gint len; QcdmResult *result; gsize reply_len; + const char *str; len = qcdm_cmd_sw_version_new (buf, sizeof (buf)); g_assert (len == 4); @@ -846,12 +847,11 @@ test_com_sw_version (void *f, void *data) /* Parse the response into a result structure */ result = qcdm_cmd_sw_version_result (buf, reply_len, &err); + if (!result) { + g_assert_cmpint (err, ==, -QCDM_ERROR_RESPONSE_BAD_COMMAND); + return; + } - /* Recent devices don't appear to implement this command */ - g_assert (result == NULL); - g_assert_cmpint (err, ==, -QCDM_ERROR_RESPONSE_BAD_COMMAND); - -/* str = NULL; qcdm_result_get_string (result, QCDM_CMD_SW_VERSION_ITEM_VERSION, &str); g_message ("%s: SW Version: %s", __func__, str); @@ -865,7 +865,6 @@ test_com_sw_version (void *f, void *data) g_message ("%s: Compiled Time: %s", __func__, str); qcdm_result_unref (result); -*/ } void |