diff options
author | Matt Ranostay <matt.ranostay@konsulko.com> | 2018-11-11 19:14:22 -0800 |
---|---|---|
committer | Matt Ranostay <matt.ranostay@konsulko.com> | 2018-11-21 13:43:43 -0800 |
commit | a7c4936942fad1890bab6d594b54f80f0cd89bc7 (patch) | |
tree | 4a4b264d8e6644f7f5f7a5ac36e7da4562a8c666 /binding/gdbus | |
parent | 4a780082fa5aa993ec2c38cb1d3d92ea5b069950 (diff) |
binding: telephony: fix segfaulting when modem is connected
Serial field isn't always passed if the device isn't connected
causing a segfault when strcmp() is called.
Change-Id: I0be1d9270a66df099786170136913a4b5525d582
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'binding/gdbus')
-rw-r--r-- | binding/gdbus/ofono_manager.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/binding/gdbus/ofono_manager.c b/binding/gdbus/ofono_manager.c index ebe1412..1086beb 100644 --- a/binding/gdbus/ofono_manager.c +++ b/binding/gdbus/ofono_manager.c @@ -70,7 +70,7 @@ int ofono_manager_set_default_modem(const char *address) type = g_variant_get_string(value, NULL); } /* If the HFP modem matches the BT address, is powered, and online then set as default */ - if (!strcmp(type, "hfp") && !strcmp(address, serial) && powered && online) { + if (!g_strcmp0(type, "hfp") && !g_strcmp0(address, serial) && powered && online) { default_modem.address = serial; default_modem.path = path; default_modem.name = name; |