aboutsummaryrefslogtreecommitdiff
path: root/src/transport/gnunet-service-transport_clients.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-02-12 18:22:01 +0000
committerChristian Grothoff <christian@grothoff.org>2012-02-12 18:22:01 +0000
commit345483c26782dadf9cb72333b32d9476e5b83480 (patch)
tree1c74adcfdad2dce9528a2f6affb6289c22c44171 /src/transport/gnunet-service-transport_clients.c
parented0d23cb1b7dd4b40fb25b5edaeb32012b225a04 (diff)
downloadgnunet-345483c26782dadf9cb72333b32d9476e5b83480.tar.gz
gnunet-345483c26782dadf9cb72333b32d9476e5b83480.zip
-GArik: remove redundant comparison, also use %p for pointers
Diffstat (limited to 'src/transport/gnunet-service-transport_clients.c')
-rw-r--r--src/transport/gnunet-service-transport_clients.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/transport/gnunet-service-transport_clients.c b/src/transport/gnunet-service-transport_clients.c
index 8bc11f3c9..a6b9c40ed 100644
--- a/src/transport/gnunet-service-transport_clients.c
+++ b/src/transport/gnunet-service-transport_clients.c
@@ -210,7 +210,7 @@ setup_client (struct GNUNET_SERVER_Client *client)
210 tc->client = client; 210 tc->client = client;
211 211
212#if DEBUG_TRANSPORT 212#if DEBUG_TRANSPORT
213 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Client %X connected\n", tc); 213 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Client %p connected\n", tc);
214#endif 214#endif
215 return tc; 215 return tc;
216} 216}
@@ -264,7 +264,7 @@ setup_monitoring_client (struct GNUNET_SERVER_Client *client,
264 GNUNET_SERVER_notification_context_add (nc, client); 264 GNUNET_SERVER_notification_context_add (nc, client);
265 265
266 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 266 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
267 "Client %X started monitoring of the peer `%s'\n", 267 "Client %p started monitoring of the peer `%s'\n",
268 mc, GNUNET_i2s (peer)); 268 mc, GNUNET_i2s (peer));
269 return mc; 269 return mc;
270} 270}
@@ -309,7 +309,7 @@ transmit_to_client_callback (void *cls, size_t size, void *buf)
309 break; 309 break;
310#if DEBUG_TRANSPORT 310#if DEBUG_TRANSPORT
311 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 311 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
312 "Transmitting message of type %u to client %X.\n", 312 "Transmitting message of type %u to client %p.\n",
313 ntohs (msg->type), tc); 313 ntohs (msg->type), tc);
314#endif 314#endif
315 GNUNET_CONTAINER_DLL_remove (tc->message_queue_head, tc->message_queue_tail, 315 GNUNET_CONTAINER_DLL_remove (tc->message_queue_head, tc->message_queue_tail,
@@ -405,7 +405,7 @@ client_disconnect_notification (void *cls, struct GNUNET_SERVER_Client *client)
405 return; 405 return;
406#if DEBUG_TRANSPORT 406#if DEBUG_TRANSPORT
407 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG | GNUNET_ERROR_TYPE_BULK, 407 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG | GNUNET_ERROR_TYPE_BULK,
408 "Client %X disconnected, cleaning up.\n", tc); 408 "Client %p disconnected, cleaning up.\n", tc);
409#endif 409#endif
410 while (NULL != (mqe = tc->message_queue_head)) 410 while (NULL != (mqe = tc->message_queue_head))
411 { 411 {
@@ -482,19 +482,15 @@ clients_handle_start (void *cls, struct GNUNET_SERVER_Client *client,
482 tc = lookup_client (client); 482 tc = lookup_client (client);
483 483
484#if DEBUG_TRANSPORT 484#if DEBUG_TRANSPORT
485 if (tc != NULL) 485 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG | GNUNET_ERROR_TYPE_BULK,
486 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG | GNUNET_ERROR_TYPE_BULK, 486 "Client %p sent START\n", tc);
487 "Client %X sent START\n", tc);
488 else
489 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG | GNUNET_ERROR_TYPE_BULK,
490 "Client %X sent START\n", tc);
491#endif 487#endif
492 if (tc != NULL) 488 if (tc != NULL)
493 { 489 {
494 /* got 'start' twice from the same client, not allowed */ 490 /* got 'start' twice from the same client, not allowed */
495#if DEBUG_TRANSPORT 491#if DEBUG_TRANSPORT
496 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG | GNUNET_ERROR_TYPE_BULK, 492 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG | GNUNET_ERROR_TYPE_BULK,
497 "TransportClient %X ServerClient %X sent multiple START messages\n", 493 "TransportClient %p ServerClient %p sent multiple START messages\n",
498 tc, tc->client); 494 tc, tc->client);
499#endif 495#endif
500 GNUNET_break (0); 496 GNUNET_break (0);
@@ -919,7 +915,7 @@ clients_handle_address_iterate (void *cls, struct GNUNET_SERVER_Client *client,
919 if (mc != NULL) 915 if (mc != NULL)
920 { 916 {
921 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG | GNUNET_ERROR_TYPE_BULK, 917 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG | GNUNET_ERROR_TYPE_BULK,
922 "ServerClient %X tried to start monitoring twice (MonitoringClient %X)\n", 918 "ServerClient %p tried to start monitoring twice (MonitoringClient %p)\n",
923 client, mc); 919 client, mc);
924 GNUNET_break (0); 920 GNUNET_break (0);
925 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); 921 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);