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
1=== modified file 'libsyncdaemon/syncdaemon-authentication.c'
2--- libsyncdaemon/syncdaemon-authentication.c 2011-10-06 13:53:56 +0000
3+++ libsyncdaemon/syncdaemon-authentication.c 2012-01-03 16:37:38 +0000
4@@ -162,13 +162,6 @@
5 auth->priv->proxy = dbus_g_proxy_new_for_name (auth->priv->bus, "com.ubuntuone.Credentials",
6 "/credentials", "com.ubuntuone.CredentialsManagement");
7 if (auth->priv->proxy != NULL) {
8- dbus_g_object_register_marshaller (_syncdaemon_marshal_VOID__POINTER,
9- G_TYPE_NONE,
10- dbus_g_type_get_map ("GHashTable",
11- G_TYPE_STRING,
12- G_TYPE_STRING),
13- G_TYPE_INVALID);
14-
15 dbus_g_proxy_add_signal (auth->priv->proxy, "CredentialsFound",
16 dbus_g_type_get_map ("GHashTable",
17 G_TYPE_STRING,
18
19=== modified file 'libsyncdaemon/syncdaemon-marshal.list'
20--- libsyncdaemon/syncdaemon-marshal.list 2010-08-11 08:48:24 +0000
21+++ libsyncdaemon/syncdaemon-marshal.list 2012-01-03 16:37:38 +0000
22@@ -1,4 +1,3 @@
23-NONE:POINTER
24 NONE:STRING,POINTER
25 NONE:STRING,OBJECT
26 NONE:POINTER,STRING
27
28=== modified file 'libsyncdaemon/syncdaemon-publicfiles-interface.c'
29--- libsyncdaemon/syncdaemon-publicfiles-interface.c 2010-11-03 14:58:41 +0000
30+++ libsyncdaemon/syncdaemon-publicfiles-interface.c 2012-01-03 16:37:38 +0000
31@@ -59,6 +59,8 @@
32 SyncdaemonDaemon *daemon = NULL;
33 SyncdaemonPublicfilesInterface *interface = SYNCDAEMON_PUBLICFILES_INTERFACE (user_data);
34
35+ g_return_if_fail (hash != NULL);
36+
37 g_object_get (G_OBJECT (interface), "daemon", &daemon, NULL);
38 if (daemon != NULL) {
39 SyncdaemonFileInfo *finfo;
40@@ -79,6 +81,8 @@
41 SyncdaemonDaemon *daemon = NULL;
42 SyncdaemonPublicfilesInterface *interface = SYNCDAEMON_PUBLICFILES_INTERFACE (user_data);
43
44+ g_return_if_fail (files != NULL);
45+
46 if (interface->priv->public_files == NULL) {
47 interface->priv->public_files = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref);
48 }
49@@ -106,6 +110,8 @@
50 SyncdaemonDaemon *daemon = NULL;
51 SyncdaemonPublicfilesInterface *interface = SYNCDAEMON_PUBLICFILES_INTERFACE (user_data);
52
53+ g_return_if_fail (hash != NULL);
54+
55 g_object_get (G_OBJECT (interface), "daemon", &daemon, NULL);
56 if (daemon != NULL) {
57 SyncdaemonFileInfo *finfo;

Subscribers

People subscribed via source and target branches