[Commits] client.c 1.2 1.3

miras at claws-mail.org miras at claws-mail.org
Tue Oct 4 22:21:42 CEST 2011


Update of /home/claws-mail/contacts/dbus-client
In directory claws-mail:/tmp/cvs-serv4887/dbus-client

Modified Files:
	client.c 
Log Message:
2011-10-04 [mir]	0.6.0cvs20

	* dbus-client/client.c
	* plugins/example/example-plugin.c
	* plugins/ldap/ldap-plugin.c
	* plugins/xml/plugin-init.c
	* plugins/xml/xml-plugin.c
	* src/about.c
	* src/callbacks.c
	* src/claws-contacts.c
	* src/contactwindow.c
	* src/gtk-utils.c
	* src/mainwindow.c
	* src/plugin-loader.c
	* src/plugin-loader.h
	* src/plugin.h
	* src/printing.c
	* src/utils.c
	* src/utils.h
	* src/dbus/dbus-service.c
	* src/dbus/server-object.c
	* xmllib/parser.c
	* xmllib/parser.h
	    - Implemented forgotten functionality to reactivate closed
	    address books.
	    - Fix a ton of bugs.
	    - Extended plugin API so that it is possible to get a list
	      of closed address books as well as splitting attributes
	      in mandatory and optional.
	    - Provide plugins a way to have a fixed set of attributes.
	      Eg. LDAP has a finite set of attributes while XML supports
	      an infinite set of attributes. 

Index: client.c
===================================================================
RCS file: /home/claws-mail/contacts/dbus-client/client.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- client.c	20 Sep 2011 21:58:43 -0000	1.2
+++ client.c	4 Oct 2011 20:21:40 -0000	1.3
@@ -79,7 +79,7 @@
     g_option_context_set_help_enabled(context, TRUE);
     if (! g_option_context_parse(context, argc, argv, &error)) {
         g_print("Parsing options failed: %s\n", error->message);
-        g_error_free(error);
+        g_clear_error(&error);
         res = TRUE;
     }
     g_option_context_free(context);
@@ -111,6 +111,7 @@
     if (error) {
         g_printerr("Fail to convert [%s]: %s\n", charset, error->message);
         g_free(current);
+        g_clear_error(&error);
         exit(EXIT_FAILURE);
     }
     g_free(current);
@@ -226,7 +227,7 @@
     connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
     if (connection == NULL || error) {
         g_warning("Unable to connect to dbus: %s\n", error->message);
-        g_error_free(error);
+        g_clear_error(&error);
         return 1;
     }
     
@@ -241,15 +242,15 @@
 
     if (strcmp(argv[1], "show") == 0) {
         if (!org_clawsmail_Contacts_show_addressbook(proxy, compose_mode, &error)) {
-            g_warning ("Woops remote method failed: %s", error->message);
-            g_error_free (error);
+            g_warning("Woops remote method failed: %s", error->message);
+            g_clear_error(&error);
             return 12;
         }
     }
     else if (strcmp(argv[1], "ping") == 0) {
         if (!org_clawsmail_Contacts_ping(proxy, &reply, &error)) {
-            g_warning ("Woops remote method failed: %s", error->message);
-            g_error_free (error);
+            g_warning("Woops remote method failed: %s", error->message);
+            g_clear_error(&error);
             free_ptr_array(test);
             return 5;
         }
@@ -262,8 +263,8 @@
             return 6;
         }
         if (!org_clawsmail_Contacts_commit(proxy, addrbook, &succes, &error)) {
-            g_warning ("Woops remote method failed: %s", error->message);
-            g_error_free (error);
+            g_warning("Woops remote method failed: %s", error->message);
+            g_clear_error(&error);
             free_ptr_array(test);
             return 7;
         }
@@ -279,8 +280,8 @@
         }
         if (!org_clawsmail_Contacts_search_addressbook(
                 proxy, search, addrbook, &test, &error)) {
-            g_warning ("Woops remote method failed: %s", error->message);
-            g_error_free (error);
+            g_warning("Woops remote method failed: %s", error->message);
+            g_clear_error(&error);
             free_ptr_array(test);
             return 9;
         }
@@ -301,8 +302,8 @@
         g_free(contact_info);
         if (!org_clawsmail_Contacts_add_contact(
             proxy, addrbook, contact.data, contact.emails, &error)) {
-            g_warning ("Woops remote method failed: %s", error->message);
-            g_error_free (error);
+            g_warning("Woops remote method failed: %s", error->message);
+            g_clear_error(&error);
             dbus_contact_free(&contact);
             return 10;
         }
@@ -310,8 +311,8 @@
     }
     else if (strcmp(argv[1], "list") == 0) {
         if (!org_clawsmail_Contacts_book_list(proxy, &test, &error)) {
-            g_warning ("Woops remote method failed: %s", error->message);
-            g_error_free (error);
+            g_warning("Woops remote method failed: %s", error->message);
+            g_clear_error(&error);
             free_ptr_array(test);
             return 13;
         }



More information about the Commits mailing list