On Wed, 2007-10-03 at 07:13 +0100, Mark Ellis wrote:
> On Mon, 2007-10-01 at 16:58 +0930, Iain Buchanan wrote:
> Do you have a password on your device ? I'm still thinking, hopefully
> send you a little debug patch soon.
> 

Try the attached patch, hopefully it will prevent the segfault. If that
works ok we can start to figure out why the connection is a bit flaky.

Mark

diff -Nur synce-trayicon-0.9.0.svn20071002.orig/src/odccm-client.c synce-trayicon-0.9.0.svn20071002/src/odccm-client.c
--- synce-trayicon-0.9.0.svn20071002.orig/src/odccm-client.c	2007-08-23 09:22:00.000000000 +0100
+++ synce-trayicon-0.9.0.svn20071002/src/odccm-client.c	2007-10-03 21:54:35.000000000 +0100
@@ -411,13 +411,6 @@
     goto error_exit;
   }
 
-  g_object_get(device, "name", &name, NULL);
-  proxy_store *p_store = g_malloc0(sizeof(proxy_store));
-  p_store->pdaname = g_strdup(name);
-  p_store->proxy = new_proxy;
-
-  g_ptr_array_add(priv->dev_proxies, p_store);
-
   dbus_g_proxy_add_signal (new_proxy, "PasswordFlagsChanged",
 			   G_TYPE_UINT, G_TYPE_UINT, G_TYPE_INVALID);
   dbus_g_proxy_connect_signal (new_proxy, "PasswordFlagsChanged",
@@ -432,6 +425,13 @@
     goto error_exit;
   }
 
+  g_object_get(device, "name", &name, NULL);
+  proxy_store *p_store = g_malloc0(sizeof(proxy_store));
+  p_store->pdaname = g_strdup(name);
+  p_store->proxy = new_proxy;
+
+  g_ptr_array_add(priv->dev_proxies, p_store);
+
   if (password_flags & ODCCM_DEVICE_PASSWORD_FLAG_PROVIDE) {
     g_hash_table_insert(priv->pending_devices, g_strdup(name), device);
     g_signal_emit (self, DCCM_CLIENT_GET_INTERFACE (self)->signals[PASSWORD_REQUIRED], 0, name);
@@ -439,8 +439,12 @@
   }
 
   /* get rapi connection */
-  if (!(odccm_device_get_rapi_connection(self, device)))
-     goto error_exit;
+  if (!(odccm_device_get_rapi_connection(self, device))) {
+    g_ptr_array_remove(priv->dev_proxies, p_store);
+    g_free(p_store->pdaname);
+    g_free(p_store);
+    goto error_exit;
+  }
 
   g_signal_emit(self, DCCM_CLIENT_GET_INTERFACE (self)->signals[DEVICE_CONNECTED], 0, name, (gpointer)device);
   g_free(name);
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
SynCE-Devel mailing list
SynCE-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synce-devel

Reply via email to