X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=libmodest-dbus-client%2Flibmodest-dbus-client.c;h=35041ac8ca30ac2e07955331dbc48a646d48cac8;hp=874d5db1c4fed758e8b939059baecaaa2da59f20;hb=3d57d7b35bab2209eac6847e43821388f8697da8;hpb=713b9b22fde23bee52afd8445fcb7053a1b569a3 diff --git a/libmodest-dbus-client/libmodest-dbus-client.c b/libmodest-dbus-client/libmodest-dbus-client.c index 874d5db..35041ac 100644 --- a/libmodest-dbus-client/libmodest-dbus-client.c +++ b/libmodest-dbus-client/libmodest-dbus-client.c @@ -118,10 +118,10 @@ libmodest_dbus_client_compose_mail (osso_context_t *osso_context, const gchar *t const gchar *bcc, const gchar* subject, const gchar* body, GSList *attachments) { osso_rpc_t retval; - + gchar *attachments_str = get_attachments_string(attachments); - const osso_return_t ret = osso_rpc_run_with_defaults(osso_context, + const osso_return_t ret = osso_rpc_run_with_defaults(osso_context, MODEST_DBUS_NAME, MODEST_DBUS_METHOD_COMPOSE_MAIL, &retval, DBUS_TYPE_STRING, to, @@ -131,18 +131,19 @@ libmodest_dbus_client_compose_mail (osso_context_t *osso_context, const gchar *t DBUS_TYPE_STRING, body, DBUS_TYPE_STRING, attachments_str, DBUS_TYPE_INVALID); - + + g_free (attachments_str); + if (ret != OSSO_OK) { printf("debug: %s: osso_rpc_run() failed.\n", __FUNCTION__); return FALSE; } else { printf("debug: %s: osso_rpc_run() succeeded.\n", __FUNCTION__); } - + osso_rpc_free_val(&retval); - g_free (attachments_str); - + return TRUE; }