aboutsummaryrefslogtreecommitdiff
path: root/src/conversation/gnunet-conversation-gtk_import.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/conversation/gnunet-conversation-gtk_import.c')
-rw-r--r--src/conversation/gnunet-conversation-gtk_import.c35
1 files changed, 14 insertions, 21 deletions
diff --git a/src/conversation/gnunet-conversation-gtk_import.c b/src/conversation/gnunet-conversation-gtk_import.c
index cc16d386..9602ff7d 100644
--- a/src/conversation/gnunet-conversation-gtk_import.c
+++ b/src/conversation/gnunet-conversation-gtk_import.c
@@ -99,17 +99,14 @@ static int private_record;
99 * operation. 99 * operation.
100 * 100 *
101 * @param cls NULL 101 * @param cls NULL
102 * @param success #GNUNET_SYSERR on failure (including timeout/queue 102 * @param ec the error code
103 * drop/failure to validate) #GNUNET_NO if content was already there #GNUNET_YES
104 * (or other positive value) on success
105 * @param emsg NULL on success, otherwise an error message
106 */ 103 */
107static void 104static void
108add_contact_continuation (void *cls, int32_t success, const char *emsg) 105add_contact_continuation (void *cls, enum GNUNET_ErrorCode ec)
109{ 106{
110 if (GNUNET_YES != success) 107 if (GNUNET_EC_NONE != ec)
111 GCG_log (_ ("Adding contact failed: %s\n"), 108 GCG_log (_ ("Adding contact failed: %s\n"),
112 (GNUNET_NO == success) ? _ ("record exists") : emsg); 109 GNUNET_ErrorCode_get_hint (ec));
113 add_contact_qe = NULL; 110 add_contact_qe = NULL;
114} 111}
115 112
@@ -195,18 +192,16 @@ GSC_add_contact (const gchar *name, const gchar *address)
195 * add operation. Finish 'add phone' operation. 192 * add operation. Finish 'add phone' operation.
196 * 193 *
197 * @param cls closure 194 * @param cls closure
198 * @param success #GNUNET_SYSERR on failure (including timeout/queue 195 * @param ec the errro code
199 * drop/failure to validate) #GNUNET_NO if content was already there or not
200 * found #GNUNET_YES (or other positive value) on success
201 * @param emsg NULL on success, otherwise an error message
202 */ 196 */
203static void 197static void
204add_phone_continuation (void *cls, int32_t success, const char *emsg) 198add_phone_continuation (void *cls, enum GNUNET_ErrorCode ec)
205{ 199{
206 add_phone_qe = NULL; 200 add_phone_qe = NULL;
207 if (GNUNET_SYSERR == success) 201 if (GNUNET_EC_NONE != ec)
208 { 202 {
209 GCG_log (_ ("Failed to publish my PHONE record: %s\n"), emsg); 203 GCG_log (_ ("Failed to publish my PHONE record: %s\n"),
204 GNUNET_ErrorCode_get_hint (ec));
210 GNUNET_free (phone_label); 205 GNUNET_free (phone_label);
211 phone_label = NULL; 206 phone_label = NULL;
212 } 207 }
@@ -354,17 +349,15 @@ finish_shutdown ()
354 * with 'add phone' operation if one is pending. 349 * with 'add phone' operation if one is pending.
355 * 350 *
356 * @param cls closure 351 * @param cls closure
357 * @param success #GNUNET_SYSERR on failure (including timeout/queue 352 * @param ec the error code
358 * drop/failure to validate) #GNUNET_NO if content was already there or not
359 * found #GNUNET_YES (or other positive value) on success
360 * @param emsg NULL on success, otherwise an error message
361 */ 353 */
362static void 354static void
363remove_phone_continuation (void *cls, int32_t success, const char *emsg) 355remove_phone_continuation (void *cls, enum GNUNET_ErrorCode ec)
364{ 356{
365 remove_phone_qe = NULL; 357 remove_phone_qe = NULL;
366 if (GNUNET_SYSERR == success) 358 if (GNUNET_EC_NONE != ec)
367 GCG_log (_ ("Failed to remove PHONE record: %s\n"), emsg); 359 GCG_log (_ ("Failed to remove PHONE record: %s\n"),
360 GNUNET_ErrorCode_get_hint (ec));
368 if (GNUNET_YES == add_waiting) 361 if (GNUNET_YES == add_waiting)
369 add_phone (); 362 add_phone ();
370 if (GNUNET_YES == in_shutdown) 363 if (GNUNET_YES == in_shutdown)