aboutsummaryrefslogtreecommitdiff
path: root/src/identity/gnunet-service-identity.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-07-17 10:33:29 +0000
committerChristian Grothoff <christian@grothoff.org>2013-07-17 10:33:29 +0000
commite885868546bafeba87461678102bc4644065a1ba (patch)
tree85fa4d655955987129101515049a7a48fb3d99dc /src/identity/gnunet-service-identity.c
parent8d689d0293e48b14377db1dc4e237980183a0b28 (diff)
downloadgnunet-e885868546bafeba87461678102bc4644065a1ba.tar.gz
gnunet-e885868546bafeba87461678102bc4644065a1ba.zip
-identity API bugfixes
Diffstat (limited to 'src/identity/gnunet-service-identity.c')
-rw-r--r--src/identity/gnunet-service-identity.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/identity/gnunet-service-identity.c b/src/identity/gnunet-service-identity.c
index ec874fa6f..fe6c3efa7 100644
--- a/src/identity/gnunet-service-identity.c
+++ b/src/identity/gnunet-service-identity.c
@@ -191,7 +191,11 @@ send_result_code (struct GNUNET_SERVER_Client *client,
191 rcm->header.size = htons (sizeof (struct GNUNET_IDENTITY_ResultCodeMessage) + elen); 191 rcm->header.size = htons (sizeof (struct GNUNET_IDENTITY_ResultCodeMessage) + elen);
192 rcm->result_code = htonl (result_code); 192 rcm->result_code = htonl (result_code);
193 memcpy (&rcm[1], emsg, elen); 193 memcpy (&rcm[1], emsg, elen);
194 GNUNET_SERVER_notification_context_unicast (nc, client, &rcm->header, GNUNET_YES); 194 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
195 "Sending result %d (%s) to client\n",
196 (int) result_code,
197 emsg);
198 GNUNET_SERVER_notification_context_unicast (nc, client, &rcm->header, GNUNET_NO);
195 GNUNET_free (rcm); 199 GNUNET_free (rcm);
196} 200}
197 201
@@ -284,14 +288,14 @@ handle_start_message (void *cls, struct GNUNET_SERVER_Client *client,
284 for (ego = ego_head; NULL != ego; ego = ego->next) 288 for (ego = ego_head; NULL != ego; ego = ego->next)
285 { 289 {
286 um = create_update_message (ego); 290 um = create_update_message (ego);
287 GNUNET_SERVER_notification_context_unicast (nc, client, &um->header, GNUNET_YES); 291 GNUNET_SERVER_notification_context_unicast (nc, client, &um->header, GNUNET_NO);
288 GNUNET_free (um); 292 GNUNET_free (um);
289 } 293 }
290 ume.header.type = htons (GNUNET_MESSAGE_TYPE_IDENTITY_UPDATE); 294 ume.header.type = htons (GNUNET_MESSAGE_TYPE_IDENTITY_UPDATE);
291 ume.header.size = htons (sizeof (struct GNUNET_IDENTITY_UpdateMessage)); 295 ume.header.size = htons (sizeof (struct GNUNET_IDENTITY_UpdateMessage));
292 ume.pk_len = htons (0); 296 ume.pk_len = htons (0);
293 ume.name_len = htons (0); 297 ume.name_len = htons (0);
294 GNUNET_SERVER_notification_context_unicast (nc, client, &ume.header, GNUNET_YES); 298 GNUNET_SERVER_notification_context_unicast (nc, client, &ume.header, GNUNET_NO);
295 GNUNET_SERVER_receive_done (client, GNUNET_OK); 299 GNUNET_SERVER_receive_done (client, GNUNET_OK);
296} 300}
297 301
@@ -353,7 +357,7 @@ handle_get_default_message (void *cls, struct GNUNET_SERVER_Client *client,
353 { 357 {
354 sdm = create_set_default_message (ego, 358 sdm = create_set_default_message (ego,
355 name); 359 name);
356 GNUNET_SERVER_notification_context_broadcast (nc, &sdm->header, GNUNET_YES); 360 GNUNET_SERVER_notification_context_broadcast (nc, &sdm->header, GNUNET_NO);
357 GNUNET_free (sdm); 361 GNUNET_free (sdm);
358 GNUNET_SERVER_receive_done (client, GNUNET_OK); 362 GNUNET_SERVER_receive_done (client, GNUNET_OK);
359 return; 363 return;
@@ -470,7 +474,7 @@ notify_listeners (struct Ego *ego)
470 struct GNUNET_IDENTITY_UpdateMessage *um; 474 struct GNUNET_IDENTITY_UpdateMessage *um;
471 475
472 um = create_update_message (ego); 476 um = create_update_message (ego);
473 GNUNET_SERVER_notification_context_broadcast (nc, &um->header, GNUNET_YES); 477 GNUNET_SERVER_notification_context_broadcast (nc, &um->header, GNUNET_NO);
474 GNUNET_free (um); 478 GNUNET_free (um);
475} 479}
476 480