diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2013-07-18 11:17:40 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2013-07-18 11:17:40 +0200 |
commit | bdbbe4dce57444291632fca1a5b87b1ebb2573ed (patch) | |
tree | 227204dc735168835195574eac891a3b70cca67b | |
parent | 3e9577081174cbc1f5d5f3b9ba8a2a348a9ab1da (diff) | |
download | external_libqmi-bdbbe4dce57444291632fca1a5b87b1ebb2573ed.zip external_libqmi-bdbbe4dce57444291632fca1a5b87b1ebb2573ed.tar.gz external_libqmi-bdbbe4dce57444291632fca1a5b87b1ebb2573ed.tar.bz2 |
dms: 'SID' TLV in 'DMS Activate Manual' is a guint16, not a string
-rw-r--r-- | cli/qmicli-dms.c | 10 | ||||
-rw-r--r-- | data/qmi-service-dms.json | 5 |
2 files changed, 11 insertions, 4 deletions
diff --git a/cli/qmicli-dms.c b/cli/qmicli-dms.c index e94405b..0ad64a6 100644 --- a/cli/qmicli-dms.c +++ b/cli/qmicli-dms.c @@ -1716,6 +1716,7 @@ activate_manual_input_create (const gchar *str) QmiMessageDmsActivateManualInput *input; gchar **split; GError *error = NULL; + gulong split_1_int; split = g_strsplit (str, ",", -1); if (g_strv_length (split) != 4) { @@ -1724,11 +1725,18 @@ activate_manual_input_create (const gchar *str) return NULL; } + split_1_int = strtoul (split[1], NULL, 10); + if (split_1_int > G_MAXUINT16) { + g_printerr ("error: invalid SID given '%s'\n", + split[1]); + return NULL; + } + input = qmi_message_dms_activate_manual_input_new (); if (!qmi_message_dms_activate_manual_input_set_info ( input, split[0], - split[1], + (guint16)split_1_int, split[2], split[3], &error)) { diff --git a/data/qmi-service-dms.json b/data/qmi-service-dms.json index 2664c5b..9d0e2c7 100644 --- a/data/qmi-service-dms.json +++ b/data/qmi-service-dms.json @@ -586,9 +586,8 @@ "contents" : [ { "name" : "Service Programming Code", "format" : "string", "fixed-size" : "6" }, - { "name" : "System Identification Number", - "format" : "string", - "fixed-size" : "2" }, + { "name" : "System Identification Number", + "format" : "guint16" }, { "name" : "Mobile Directory Number", "format" : "string", "max-size" : "15" }, |