diff options
author | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2008-09-22 13:05:07 +0100 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2008-10-28 12:18:23 +0000 |
commit | 48b261f13d1cc83d4f1b35235aab05f802b2b2a7 (patch) | |
tree | 6eef915a7a1bc43235ef96abc4ca4ad3025c7b38 /src | |
parent | fd91bc41150a0a4892b2d0029a782184875eae2a (diff) | |
download | telepathy-salut-48b261f13d1cc83d4f1b35235aab05f802b2b2a7.tar.gz |
Handle error messages with printf format strings in.
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Diffstat (limited to 'src')
-rw-r--r-- | src/salut-connection.c | 3 | ||||
-rw-r--r-- | src/salut-muc-manager.c | 4 | ||||
-rw-r--r-- | src/salut-self.c | 6 | ||||
-rw-r--r-- | src/write-mgr-file.c | 2 |
4 files changed, 9 insertions, 6 deletions
diff --git a/src/salut-connection.c b/src/salut-connection.c index 84244b29..4c2ecb9c 100644 --- a/src/salut-connection.c +++ b/src/salut-connection.c @@ -581,7 +581,8 @@ set_own_status (GObject *obj, } else { - g_set_error (error, TP_ERRORS, TP_ERROR_NETWORK_ERROR, err->message); + *error = g_error_new_literal (TP_ERRORS, TP_ERROR_NETWORK_ERROR, + err->message); } return TRUE; diff --git a/src/salut-muc-manager.c b/src/salut-muc-manager.c index 48cf3909..5766a1da 100644 --- a/src/salut-muc-manager.c +++ b/src/salut-muc-manager.c @@ -569,7 +569,7 @@ salut_muc_manager_request_new_muc_channel (SalutMucManager *mgr, if (connection == NULL) { DEBUG ("get connection failed: %s", connection_error->message); - g_set_error (error, TP_ERRORS, TP_ERROR_NETWORK_ERROR, + *error = g_error_new_literal (TP_ERRORS, TP_ERROR_NETWORK_ERROR, connection_error->message); g_error_free (connection_error); return NULL; @@ -579,7 +579,7 @@ salut_muc_manager_request_new_muc_channel (SalutMucManager *mgr, if (!gibber_muc_connection_connect (connection, &connection_error)) { DEBUG ("Connect failed: %s", connection_error->message); - g_set_error (error, TP_ERRORS, TP_ERROR_NETWORK_ERROR, + *error = g_error_new_literal (TP_ERRORS, TP_ERROR_NETWORK_ERROR, connection_error->message); g_error_free (connection_error); g_object_unref (connection); diff --git a/src/salut-self.c b/src/salut-self.c index 3e1cfe86..8ffbc558 100644 --- a/src/salut-self.c +++ b/src/salut-self.c @@ -578,7 +578,8 @@ salut_self_set_alias (SalutSelf *self, const gchar *alias, GError **error) ret = SALUT_SELF_GET_CLASS (self)->set_alias (self, &err); if (!ret) { - g_set_error (error, TP_ERRORS, TP_ERROR_NETWORK_ERROR, err->message); + *error = g_error_new_literal (TP_ERRORS, TP_ERROR_NETWORK_ERROR, + err->message); g_error_free (err); } return ret; @@ -619,7 +620,8 @@ salut_self_set_avatar (SalutSelf *self, guint8 *data, if (!ret) { salut_self_remove_avatar (self); - g_set_error (error, TP_ERRORS, TP_ERROR_NETWORK_ERROR, err->message); + *error = g_error_new_literal (TP_ERRORS, TP_ERROR_NETWORK_ERROR, + err->message); g_error_free (err); } diff --git a/src/write-mgr-file.c b/src/write-mgr-file.c index de984d75..728fdc70 100644 --- a/src/write-mgr-file.c +++ b/src/write-mgr-file.c @@ -93,7 +93,7 @@ main (void) salut_protocols, &error); if (!s) { - fprintf (stderr, error->message); + fprintf (stderr, "%s", error->message); g_error_free (error); return 1; } |