Skip to content

Commit

Permalink
Fix small gconf memory leak & small updates to version 0.41.
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 Jun 6, 2011
1 parent 1680d1d commit 27ef7d1
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 3 deletions.
2 changes: 1 addition & 1 deletion configure.ac
@@ -1,4 +1,4 @@
AC_INIT([usb_moded], [0.39])
AC_INIT([usb_moded], [0.41])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])

AM_CONFIG_HEADER([config.h])
Expand Down
13 changes: 13 additions & 0 deletions debian/changelog
@@ -1,3 +1,16 @@
usb-moded (0.41) unstable; urgency=low

* Fix forgotten case for devicelock/trigger. Fixes: NB#261558
* Small memory leak fix for the gconf handler

-- Philippe De Swert <philippe.de-swert@nokia.com> Fri, 03 Jun 2011 13:53:58 +0300

usb-moded (0.40) unstable; urgency=low

* check devicelock export permission in trigger. Fixes: NB#261558

-- Philippe De Swert <philippe.de-swert@nokia.com> Tue, 31 May 2011 14:43:00 +0300

usb-moded (0.39) unstable; urgency=low

* Add disconnect unbouncing timeout
Expand Down
2 changes: 2 additions & 0 deletions src/usb_moded-gconf.c
Expand Up @@ -83,11 +83,13 @@ int set_mode_setting(const char *mode)
if (!gconf_client_set_string(gclient, USB_MODE_GCONF, mode, NULL))
{
log_err("Unable to set GConf key");
g_object_unref(gclient);
return(1);
}
}
else
return(1);

g_object_unref(gclient);
return(0);
}
2 changes: 1 addition & 1 deletion src/usb_moded-modesetting.c
Expand Up @@ -214,7 +214,7 @@ static void report_mass_storage_blocker(const char *mountpoint)
{
gchar **split = 0;
split = g_strsplit((const gchar*)text, " ", 2);
log_debug("Mass storage blocked by process %s\n", split[0]);
log_err("Mass storage blocked by process %s\n", split[0]);
usb_moded_send_error_signal(split[0]);
g_strfreev(split);
}
Expand Down
12 changes: 11 additions & 1 deletion src/usb_moded-trigger.c
Expand Up @@ -37,6 +37,9 @@
#include "usb_moded-config.h"
#include "usb_moded-hw-ab.h"
#include "usb_moded-trigger.h"
#ifdef NOKIA
#include "usb_moded-devicelock.h"
#endif /* NOKIA */

/* global variables */
static struct udev *udev;
Expand Down Expand Up @@ -173,14 +176,21 @@ static void udev_parse(struct udev_device *dev)
{
if(!strcmp(tmp, get_trigger_value()))
{
#ifdef NOKIA
if(!usb_moded_get_export_permission())
#endif /* NOKIA */
set_usb_mode(get_trigger_mode());

}
else
return;
}
else
{
set_usb_mode(get_trigger_mode());
#ifdef NOKIA
if(!usb_moded_get_export_permission())
#endif /* NOKIA */
set_usb_mode(get_trigger_mode());
}
return;
}
Expand Down

0 comments on commit 27ef7d1

Please sign in to comment.