[PATCH] libmbim-glib: fix typo in MBIM_CID_DEVICE_SERVICE_SUBSCRIBE_LIST

Ben Chan benchan at chromium.org
Tue Feb 18 21:42:44 CET 2014


This patch renames 'MBIM_CID_DEVICE_SERVICE_SUBSCRIBER_LIST' to
'MBIM_CID_DEVICE_SERVICE_SUBSCRIBE_LIST' to be consistent with the MBIM
specification. This CID is for subscribing notifications for CIDs that
the host is interested in, and is not related to mobile 'subscriber'.
---
Aleksander,

We may want to bump the version of libmbim to make it easier to align with the
ModemManager code. How do you think?

BTW, I didn't update MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBER_LIST in NEWS :)

Thanks,
Ben


 data/mbim-service-basic-connect.json         | 2 +-
 src/libmbim-glib/mbim-cid.c                  | 2 +-
 src/libmbim-glib/mbim-cid.h                  | 4 ++--
 src/libmbim-glib/test/test-message-builder.c | 8 ++++----
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/data/mbim-service-basic-connect.json b/data/mbim-service-basic-connect.json
index 7a32409..8f0459d 100644
--- a/data/mbim-service-basic-connect.json
+++ b/data/mbim-service-basic-connect.json
@@ -667,7 +667,7 @@
                      "format"           : "guint32-array",
                      "array-size-field" : "CidsCount" } ] },
 
-  { "name"     : "Device Service Subscriber List",
+  { "name"     : "Device Service Subscribe List",
     "service"  : "Basic Connect",
     "type"     : "Command",
     "set"      : [ { "name"   : "EventsCount",
diff --git a/src/libmbim-glib/mbim-cid.c b/src/libmbim-glib/mbim-cid.c
index de86c93..3e8a39c 100644
--- a/src/libmbim-glib/mbim-cid.c
+++ b/src/libmbim-glib/mbim-cid.c
@@ -58,7 +58,7 @@ static const CidConfig cid_basic_connect_config [MBIM_CID_BASIC_CONNECT_LAST] =
     { FALSE, TRUE,  FALSE }, /* MBIM_CID_BASIC_CONNECT_DEVICE_SERVICES */
     { FALSE, FALSE, FALSE }, /* 17 reserved */
     { FALSE, FALSE, FALSE }, /* 18 reserved */
-    { TRUE,  FALSE, FALSE }, /* MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBER_LIST */
+    { TRUE,  FALSE, FALSE }, /* MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBE_LIST */
     { FALSE, TRUE,  FALSE }, /* MBIM_CID_BASIC_CONNECT_PACKET_STATISTICS */
     { TRUE,  TRUE,  FALSE }, /* MBIM_CID_BASIC_CONNECT_NETWORK_IDLE_HINT */
     { FALSE, TRUE,  TRUE  }, /* MBIM_CID_BASIC_CONNECT_EMERGENCY_MODE */
diff --git a/src/libmbim-glib/mbim-cid.h b/src/libmbim-glib/mbim-cid.h
index 031baa0..26a86dc 100644
--- a/src/libmbim-glib/mbim-cid.h
+++ b/src/libmbim-glib/mbim-cid.h
@@ -53,7 +53,7 @@ G_BEGIN_DECLS
  * @MBIM_CID_BASIC_CONNECT_SERVICE_ACTIVATION: Service activation.
  * @MBIM_CID_BASIC_CONNECT_IP_CONFIGURATION: IP configuration.
  * @MBIM_CID_BASIC_CONNECT_DEVICE_SERVICES: Device services.
- * @MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBER_LIST: Device service subscriber list.
+ * @MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBE_LIST: Device service subscribe list.
  * @MBIM_CID_BASIC_CONNECT_PACKET_STATISTICS: Packet statistics.
  * @MBIM_CID_BASIC_CONNECT_NETWORK_IDLE_HINT: Network idle hint.
  * @MBIM_CID_BASIC_CONNECT_EMERGENCY_MODE: Emergency mode.
@@ -81,7 +81,7 @@ typedef enum {
     MBIM_CID_BASIC_CONNECT_IP_CONFIGURATION               = 15,
     MBIM_CID_BASIC_CONNECT_DEVICE_SERVICES                = 16,
     /* 17, 18 reserved */
-    MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBER_LIST = 19,
+    MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBE_LIST  = 19,
     MBIM_CID_BASIC_CONNECT_PACKET_STATISTICS              = 20,
     MBIM_CID_BASIC_CONNECT_NETWORK_IDLE_HINT              = 21,
     MBIM_CID_BASIC_CONNECT_EMERGENCY_MODE                 = 22,
diff --git a/src/libmbim-glib/test/test-message-builder.c b/src/libmbim-glib/test/test-message-builder.c
index 239a8bf..a1131d0 100644
--- a/src/libmbim-glib/test/test-message-builder.c
+++ b/src/libmbim-glib/test/test-message-builder.c
@@ -410,7 +410,7 @@ test_message_builder_basic_connect_service_activation_set (void)
 }
 
 static void
-test_message_builder_basic_connect_device_service_subscriber_list_set (void)
+test_message_builder_basic_connect_device_service_subscribe_list_set (void)
 {
     GError *error = NULL;
     MbimEventEntry **entries;
@@ -470,7 +470,7 @@ test_message_builder_basic_connect_device_service_subscriber_list_set (void)
     entries[1]->cids = g_new0 (guint32, 1);
     entries[1]->cids[0] = MBIM_CID_SMS_READ;
 
-    message = (mbim_message_device_service_subscriber_list_set_new (
+    message = (mbim_message_device_service_subscribe_list_set_new (
                    2,
                    (const MbimEventEntry *const *)entries,
                    &error));
@@ -490,7 +490,7 @@ test_message_builder_basic_connect_device_service_subscriber_list_set (void)
     g_assert_cmpuint (mbim_message_get_message_length (message), ==, sizeof (expected_message));
 
     g_assert_cmpuint (mbim_message_command_get_service      (message), ==, MBIM_SERVICE_BASIC_CONNECT);
-    g_assert_cmpuint (mbim_message_command_get_cid          (message), ==, MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBER_LIST);
+    g_assert_cmpuint (mbim_message_command_get_cid          (message), ==, MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBE_LIST);
     g_assert_cmpuint (mbim_message_command_get_command_type (message), ==, MBIM_MESSAGE_COMMAND_TYPE_SET);
 
     g_assert_cmpuint (((GByteArray *)message)->len, ==, sizeof (expected_message));
@@ -1305,7 +1305,7 @@ int main (int argc, char **argv)
     g_test_add_func ("/libmbim-glib/message/builder/basic-connect/connect/set/raw", test_message_builder_basic_connect_connect_set_raw);
     g_test_add_func ("/libmbim-glib/message/builder/basic-connect/connect/set", test_message_builder_basic_connect_connect_set);
     g_test_add_func ("/libmbim-glib/message/builder/basic-connect/service-activation/set", test_message_builder_basic_connect_service_activation_set);
-    g_test_add_func ("/libmbim-glib/message/builder/basic-connect/device-service-subscriber-list/set", test_message_builder_basic_connect_device_service_subscriber_list_set);
+    g_test_add_func ("/libmbim-glib/message/builder/basic-connect/device-service-subscribe-list/set", test_message_builder_basic_connect_device_service_subscribe_list_set);
     g_test_add_func ("/libmbim-glib/message/builder/ussd/set", test_message_builder_ussd_set);
     g_test_add_func ("/libmbim-glib/message/builder/auth/akap/query", test_message_builder_auth_akap_query);
     g_test_add_func ("/libmbim-glib/message/builder/stk/pac/set", test_message_builder_stk_pac_set);
-- 
1.9.0.rc1.175.g0b1dcb5



More information about the libmbim-devel mailing list