Skip to content

Commit

Permalink
- Fix missing charging only mode in usb modes query
Browse files Browse the repository at this point in the history
- Update the usb-moded dbus config so the supported modes can be queried by a normal user

Signed-off-by: Philippe De Swert <philippedeswert@gmail.com>
  • Loading branch information
philippedeswert committed Aug 5, 2013
1 parent ae8bf3d commit 4248773
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
3 changes: 3 additions & 0 deletions debian/usb_moded.conf
Expand Up @@ -16,6 +16,9 @@
<allow send_destination="com.meego.usb_moded"
send_interface="com.meego.usb_moded" send_member="set_config"/>
<deny own="com.meego.usb_moded"/>
<allow send_destination="com.meego.usb_moded"
send_interface="com.meego.usb_moded" send_member="get_modes"/>
<deny own="com.meego.usb_moded"/>
</policy>
</busconfig>

7 changes: 2 additions & 5 deletions src/usb_moded.c
Expand Up @@ -338,11 +338,6 @@ gchar *get_mode_list(void)

modelist_str = g_string_new(NULL);

#ifdef N900
asprintf(&modelist_str->str, "%s, %s, %s, %s, %s", MODE_MASS_STORAGE, MODE_OVI_SUITE, MODE_CHARGING, MODE_DEVELOPER, MODE_MTP);
#else
asprintf(&modelist_str->str, "%s, %s, %s, %s", MODE_MASS_STORAGE, MODE_CHARGING, MODE_DEVELOPER, MODE_MTP);
#endif /* N900 */
{
/* check dynamic modes */
if(modelist)
Expand All @@ -357,6 +352,8 @@ gchar *get_mode_list(void)
}
}
}
/* end with charging mode */
g_string_append(modelist_str, MODE_CHARGING);
return(g_string_free(modelist_str, FALSE));
}

Expand Down

0 comments on commit 4248773

Please sign in to comment.