phonemgr r300 - in trunk: . libgsm



Author: hadess
Date: Fri Jun 13 04:15:40 2008
New Revision: 300
URL: http://svn.gnome.org/viewvc/phonemgr?rev=300&view=rev

Log:
2008-06-13  Bastien Nocera  <hadess hadess net>

	* libgsm/phonemgr-listener.c (phonemgr_listener_get_own_details),
	(phonemgr_listener_disconnect_cleanup): Save the IMEI of the
	phone on connect



Modified:
   trunk/ChangeLog
   trunk/libgsm/phonemgr-listener.c

Modified: trunk/libgsm/phonemgr-listener.c
==============================================================================
--- trunk/libgsm/phonemgr-listener.c	(original)
+++ trunk/libgsm/phonemgr-listener.c	Fri Jun 13 04:15:40 2008
@@ -77,6 +77,7 @@
 
 	char *driver;
 	char *own_number;
+	char *imei;
 
 	/* The previous call status */
 	gn_call_status prev_call_status;
@@ -807,7 +808,14 @@
 	gn_phonebook_entry entry;
 	int count, start_entry, end_entry, num_entries;
 	gn_error error;
+	const char *imei;
 
+	/* Get the IMEI of the phone */
+	imei = gn_lib_get_phone_imei(&l->phone_state->state);
+	if (imei != NULL)
+		l->imei = g_strdup (imei);
+
+	/* Get the own number from the phone */
 	start_entry = 1;
 	end_entry = num_entries = INT_MAX;
 
@@ -941,6 +949,8 @@
 	l->driver = NULL;
 	g_free (l->own_number);
 	l->own_number = NULL;
+	g_free (l->imei);
+	l->imei = NULL;
 	l->batterylevel = 1;
 	l->supports_power_source = TRUE;
 	l->powersource = GN_PS_BATTERY;



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