[phonemgr] Bug 577867 - Add support for libgnokii 0.6.28



commit 0b0681e2907d464518c406c83016f964e86805e6
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Sep 7 16:53:10 2009 +0100

    Bug 577867 - Add support for libgnokii 0.6.28
    
    Free the SMS reference as given back by gnokii, and
    handle the new enums for power sources.

 configure.in               |    2 +-
 libgsm/phonemgr-listener.c |    4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/configure.in b/configure.in
index 9b93629..d7758bd 100644
--- a/configure.in
+++ b/configure.in
@@ -13,7 +13,7 @@ dnl Initialize libtool
 AM_DISABLE_SHARED
 AM_PROG_LIBTOOL
 
-GNOKII_REQS="gnokii >= 0.6.27 bluez >= 3.12"
+GNOKII_REQS="gnokii >= 0.6.28"
 GNOME_BLUETOOTH_REQS="gnome-bluetooth-1.0"
 
 AC_PROG_CC
diff --git a/libgsm/phonemgr-listener.c b/libgsm/phonemgr-listener.c
index 13779db..c00f3d0 100644
--- a/libgsm/phonemgr-listener.c
+++ b/libgsm/phonemgr-listener.c
@@ -554,7 +554,7 @@ phonemgr_listener_push (PhonemgrListener *l)
 		g_message ("emitting battery");
 		phonemgr_listener_emit_battery (l,
 						(int) signal->battery->batterylevel,
-						signal->battery->powersource != GN_PS_BATTERY);
+						signal->battery->powersource == GN_PS_ACDC);
 		g_free (signal->battery);
 		break;
 	case NETWORK_SIGNAL:
@@ -1136,6 +1136,8 @@ phonemgr_listener_queue_message (PhonemgrListener *l,
 	error = gn_sms_send (&l->phone_state->data, &l->phone_state->state);
 
 	/* Remove the reference to SMS */
+	if (l->phone_state->data.sms.reference != NULL)
+		free (l->phone_state->data.sms.reference);
 	l->phone_state->data.sms = NULL;
 
 	/* Unlock the phone */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]