Merge lp:~dobey/ubuntuone-client/fix-crashes into lp:ubuntuone-client

Proposed by dobey
Status: Merged
Approved by: dobey
Approved revision: 1175
Merged at revision: 1176
Proposed branch: lp:~dobey/ubuntuone-client/fix-crashes
Merge into: lp:ubuntuone-client
Diff against target: 57 lines (+6/-8)
3 files modified
libsyncdaemon/syncdaemon-authentication.c (+0/-7)
libsyncdaemon/syncdaemon-marshal.list (+0/-1)
libsyncdaemon/syncdaemon-publicfiles-interface.c (+6/-0)
To merge this branch: bzr merge lp:~dobey/ubuntuone-client/fix-crashes
Reviewer Review Type Date Requested Status
Roberto Alsina (community) Approve
Natalia Bidart (community) Approve
Review via email: mp+87382@code.launchpad.net

Commit message

Don't register a VOID__POINTER marshaller with dbus, as this now breaks
Use g_return_if_fail to avoid NULL for important typed arguments

To post a comment you must log in.
Revision history for this message
Natalia Bidart (nataliabidart) wrote :

Looks good!

review: Approve
Revision history for this message
Roberto Alsina (ralsina) wrote :

Looks good, seems to work :-)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'libsyncdaemon/syncdaemon-authentication.c'
--- libsyncdaemon/syncdaemon-authentication.c 2011-10-06 13:53:56 +0000
+++ libsyncdaemon/syncdaemon-authentication.c 2012-01-03 16:37:38 +0000
@@ -162,13 +162,6 @@
162 auth->priv->proxy = dbus_g_proxy_new_for_name (auth->priv->bus, "com.ubuntuone.Credentials",162 auth->priv->proxy = dbus_g_proxy_new_for_name (auth->priv->bus, "com.ubuntuone.Credentials",
163 "/credentials", "com.ubuntuone.CredentialsManagement");163 "/credentials", "com.ubuntuone.CredentialsManagement");
164 if (auth->priv->proxy != NULL) {164 if (auth->priv->proxy != NULL) {
165 dbus_g_object_register_marshaller (_syncdaemon_marshal_VOID__POINTER,
166 G_TYPE_NONE,
167 dbus_g_type_get_map ("GHashTable",
168 G_TYPE_STRING,
169 G_TYPE_STRING),
170 G_TYPE_INVALID);
171
172 dbus_g_proxy_add_signal (auth->priv->proxy, "CredentialsFound",165 dbus_g_proxy_add_signal (auth->priv->proxy, "CredentialsFound",
173 dbus_g_type_get_map ("GHashTable",166 dbus_g_type_get_map ("GHashTable",
174 G_TYPE_STRING,167 G_TYPE_STRING,
175168
=== modified file 'libsyncdaemon/syncdaemon-marshal.list'
--- libsyncdaemon/syncdaemon-marshal.list 2010-08-11 08:48:24 +0000
+++ libsyncdaemon/syncdaemon-marshal.list 2012-01-03 16:37:38 +0000
@@ -1,4 +1,3 @@
1NONE:POINTER
2NONE:STRING,POINTER1NONE:STRING,POINTER
3NONE:STRING,OBJECT2NONE:STRING,OBJECT
4NONE:POINTER,STRING3NONE:POINTER,STRING
54
=== modified file 'libsyncdaemon/syncdaemon-publicfiles-interface.c'
--- libsyncdaemon/syncdaemon-publicfiles-interface.c 2010-11-03 14:58:41 +0000
+++ libsyncdaemon/syncdaemon-publicfiles-interface.c 2012-01-03 16:37:38 +0000
@@ -59,6 +59,8 @@
59 SyncdaemonDaemon *daemon = NULL;59 SyncdaemonDaemon *daemon = NULL;
60 SyncdaemonPublicfilesInterface *interface = SYNCDAEMON_PUBLICFILES_INTERFACE (user_data);60 SyncdaemonPublicfilesInterface *interface = SYNCDAEMON_PUBLICFILES_INTERFACE (user_data);
6161
62 g_return_if_fail (hash != NULL);
63
62 g_object_get (G_OBJECT (interface), "daemon", &daemon, NULL);64 g_object_get (G_OBJECT (interface), "daemon", &daemon, NULL);
63 if (daemon != NULL) {65 if (daemon != NULL) {
64 SyncdaemonFileInfo *finfo;66 SyncdaemonFileInfo *finfo;
@@ -79,6 +81,8 @@
79 SyncdaemonDaemon *daemon = NULL;81 SyncdaemonDaemon *daemon = NULL;
80 SyncdaemonPublicfilesInterface *interface = SYNCDAEMON_PUBLICFILES_INTERFACE (user_data);82 SyncdaemonPublicfilesInterface *interface = SYNCDAEMON_PUBLICFILES_INTERFACE (user_data);
8183
84 g_return_if_fail (files != NULL);
85
82 if (interface->priv->public_files == NULL) {86 if (interface->priv->public_files == NULL) {
83 interface->priv->public_files = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref);87 interface->priv->public_files = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref);
84 }88 }
@@ -106,6 +110,8 @@
106 SyncdaemonDaemon *daemon = NULL;110 SyncdaemonDaemon *daemon = NULL;
107 SyncdaemonPublicfilesInterface *interface = SYNCDAEMON_PUBLICFILES_INTERFACE (user_data);111 SyncdaemonPublicfilesInterface *interface = SYNCDAEMON_PUBLICFILES_INTERFACE (user_data);
108112
113 g_return_if_fail (hash != NULL);
114
109 g_object_get (G_OBJECT (interface), "daemon", &daemon, NULL);115 g_object_get (G_OBJECT (interface), "daemon", &daemon, NULL);
110 if (daemon != NULL) {116 if (daemon != NULL) {
111 SyncdaemonFileInfo *finfo;117 SyncdaemonFileInfo *finfo;

Subscribers

People subscribed via source and target branches