Skip to content

Commit

Permalink
fix issues with ask setting not possible through dbus
Browse files Browse the repository at this point in the history
Signed-off-by: Philippe De Swert <philippedeswert@gmail.com>
  • Loading branch information
philippedeswert committed May 19, 2011
1 parent 17613ab commit 1680d1d
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 15 deletions.
2 changes: 1 addition & 1 deletion configure.ac
@@ -1,4 +1,4 @@
AC_INIT([usb_moded], [0.38])
AC_INIT([usb_moded], [0.39])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])

AM_CONFIG_HEADER([config.h])
Expand Down
10 changes: 9 additions & 1 deletion debian/changelog
@@ -1,3 +1,11 @@
usb-moded (0.39) unstable; urgency=low

* Add disconnect unbouncing timeout
* Ask mode is also a valid mode value for setting the settings.
* More aegis insanity. Fixes: NB#254713

-- Philippe De Swert <philippe.de-swert@nokia.com> Wed, 18 May 2011 20:04:12 +0300

usb-moded (0.38) unstable; urgency=low

* Fix lintian warning
Expand All @@ -8,7 +16,7 @@ usb-moded (0.38) unstable; urgency=low
* Remove dependency on glib 2.28.0, glib 2.24.2 is enough now.
* Fix fallback mount options. Fixes: NB#255798

-- Philippe De Swert <philippe.de-swert@nokia.com> Mon May 16 13:06:17 EEST 2011
-- Philippe De Swert <philippe.de-swert@nokia.com> Mon, 16 May 2011 13:06:17 +0300

usb-moded (0.37) unstable; urgency=low

Expand Down
8 changes: 1 addition & 7 deletions debian/usb-moded.aegis
Expand Up @@ -26,14 +26,8 @@
</node>
</dbus>
</provide>
<request>
<request policy="add">
<credential name="usb-moded-dbus-bind" />
<credential name="CAP::sys_admin" />
<credential name="CAP::sys_module" />
<credential name="CAP::net_admin" />
<credential name="CAP::sys_ptrace" />
<credential name="CAP::kill" />
<credential name="CAP::dac_override" />
<for path="/usr/sbin/usb_moded" />
</request>
</aegis>
Expand Down
3 changes: 2 additions & 1 deletion src/usb_moded-gconf.c
Expand Up @@ -37,6 +37,7 @@
#include "usb_moded-gconf-private.h"
#include "usb_moded-modes.h"
#include "usb_moded-log.h"
#include "usb_moded.h"

/** Get the config option set in gconf for the default action
*
Expand Down Expand Up @@ -71,7 +72,7 @@ int set_mode_setting(const char *mode)
{
GConfClient *gclient = NULL;

if(!strcmp(mode, MODE_MASS_STORAGE) || !strcmp(mode, MODE_OVI_SUITE) || !strcmp(mode, MODE_CHARGING) || !strcmp(mode, MODE_ASK)|| !strcmp(mode, MODE_WINDOWS_NET))
if(!valid_mode(mode) || !strcmp(mode, MODE_ASK))
{
gclient = gconf_client_get_default();
if (gclient == NULL)
Expand Down
10 changes: 5 additions & 5 deletions src/usb_moded.c
Expand Up @@ -94,18 +94,18 @@ void set_usb_connected(gboolean connected)

if(connected)
{
if(debounce)
{
g_source_remove(debounce);
debounce = 0;
}
/* do not go through the routine if already connected to avoid
spurious load/unloads due to faulty signalling
NOKIA: careful with devicelock
*/
if(current_mode.connected)
return;

if(debounce)
{
g_source_remove(debounce);
debounce = 0;
}
#ifdef NOKIA
if(timeout_source)
{
Expand Down

0 comments on commit 1680d1d

Please sign in to comment.