summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2015-02-25 13:17:42 +0100
committerAleksander Morgado <aleksander@aleksander.es>2015-02-25 13:17:42 +0100
commit9d2435448912fe9af86369def253f558c49db272 (patch)
tree1e0c70c16621dddba7119abdc6a3fd0817e389d6
parent8b08e300a26d8f596cdd0aabb70dca6d295954fa (diff)
downloadlibmbim-9d2435448912fe9af86369def253f558c49db272.tar.gz
libmbim-glib,uuid: don't assert if service id is neither generic nor registered
Just warn and return NULL.
-rw-r--r--src/libmbim-glib/mbim-uuid.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libmbim-glib/mbim-uuid.c b/src/libmbim-glib/mbim-uuid.c
index 81f6f7a..6497645 100644
--- a/src/libmbim-glib/mbim-uuid.c
+++ b/src/libmbim-glib/mbim-uuid.c
@@ -356,6 +356,9 @@ mbim_service_lookup_name (guint service)
*
* Get the UUID corresponding to @service.
*
+ * The @service needs to be either a generic one (including #MBIM_SERVICE_INVALID)
+ * or a custom registered one.
+ *
* Returns: (transfer none): a #MbimUuid.
*/
const MbimUuid *
@@ -396,7 +399,7 @@ mbim_uuid_from_service (MbimService service)
if (service == ((MbimCustomService *)l->data)->service_id)
return &((MbimCustomService *)l->data)->uuid;
}
- g_assert_not_reached ();
+ g_return_val_if_reached (NULL);
}
}