Skip to content

Commit

Permalink
[usb-moded] Avoid potential crash when the DBUS system bus is not up/…
Browse files Browse the repository at this point in the history
…crashed/does not work

Signed-off-by: Philippe De Swert <philippe.deswert@jollamobile.com>
  • Loading branch information
philippedeswert committed Feb 5, 2014
1 parent 86b4ceb commit 8190b6e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/usb_moded-dsme.c
Expand Up @@ -45,6 +45,8 @@ int is_in_user_state(void)
if( (dbus_conn = dbus_bus_get(DBUS_BUS_SYSTEM, &error)) == 0 )
{
log_err("Could not connect to dbus systembus (is_in_user_state)\n");
/* dbus system bus is broken or not there, so assume not in USER state */
return(ret);
}

if ((msg = dbus_message_new_method_call("com.nokia.dsme", "/request", "com.nokia.dsme.request", "get_state")) != NULL)
Expand Down

0 comments on commit 8190b6e

Please sign in to comment.