diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-08-15 21:54:06 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-08-15 21:54:06 +0000 |
commit | 5746309cb4be2073d550ad7a6885e918631dbc38 (patch) | |
tree | 89455bc4aadf977816b38df13f990372cd81d71a /src/util/server_nc.c | |
parent | 6fd3e715cae09fa6e657c96f1c6f9711ee51f42f (diff) | |
download | gnunet-5746309cb4be2073d550ad7a6885e918631dbc38.tar.gz gnunet-5746309cb4be2073d550ad7a6885e918631dbc38.zip |
indentation
Diffstat (limited to 'src/util/server_nc.c')
-rw-r--r-- | src/util/server_nc.c | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/src/util/server_nc.c b/src/util/server_nc.c index f8e300029..a1cb43f00 100644 --- a/src/util/server_nc.c +++ b/src/util/server_nc.c | |||
@@ -323,10 +323,10 @@ transmit_message (void *cls, size_t size, void *buf) | |||
323 | "Have %u messages left in NC queue, will try transmission again\n", | 323 | "Have %u messages left in NC queue, will try transmission again\n", |
324 | cl->num_pending); | 324 | cl->num_pending); |
325 | #endif | 325 | #endif |
326 | cl->th = GNUNET_SERVER_notify_transmit_ready (cl->client, | 326 | cl->th = |
327 | ntohs (pml->msg->size), | 327 | GNUNET_SERVER_notify_transmit_ready (cl->client, ntohs (pml->msg->size), |
328 | GNUNET_TIME_UNIT_FOREVER_REL, | 328 | GNUNET_TIME_UNIT_FOREVER_REL, |
329 | &transmit_message, cl); | 329 | &transmit_message, cl); |
330 | } | 330 | } |
331 | else | 331 | else |
332 | GNUNET_assert (cl->num_pending == 0); | 332 | GNUNET_assert (cl->num_pending == 0); |
@@ -344,8 +344,8 @@ transmit_message (void *cls, size_t size, void *buf) | |||
344 | */ | 344 | */ |
345 | static void | 345 | static void |
346 | do_unicast (struct GNUNET_SERVER_NotificationContext *nc, | 346 | do_unicast (struct GNUNET_SERVER_NotificationContext *nc, |
347 | struct ClientList *client, | 347 | struct ClientList *client, const struct GNUNET_MessageHeader *msg, |
348 | const struct GNUNET_MessageHeader *msg, int can_drop) | 348 | int can_drop) |
349 | { | 349 | { |
350 | struct PendingMessageList *pml; | 350 | struct PendingMessageList *pml; |
351 | uint16_t size; | 351 | uint16_t size; |
@@ -354,8 +354,8 @@ do_unicast (struct GNUNET_SERVER_NotificationContext *nc, | |||
354 | { | 354 | { |
355 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 355 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
356 | "Dropping message of type %u and size %u due to full queue (%u entries)\n", | 356 | "Dropping message of type %u and size %u due to full queue (%u entries)\n", |
357 | ntohs (msg->type), | 357 | ntohs (msg->type), ntohs (msg->size), |
358 | ntohs (msg->size), (unsigned int) nc->queue_length); | 358 | (unsigned int) nc->queue_length); |
359 | return; /* drop! */ | 359 | return; /* drop! */ |
360 | } | 360 | } |
361 | if (client->num_pending > nc->queue_length) | 361 | if (client->num_pending > nc->queue_length) |
@@ -371,21 +371,20 @@ do_unicast (struct GNUNET_SERVER_NotificationContext *nc, | |||
371 | #if DEBUG_SERVER_NC | 371 | #if DEBUG_SERVER_NC |
372 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 372 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
373 | "Adding message of type %u and size %u to pending queue (which has %u entries)\n", | 373 | "Adding message of type %u and size %u to pending queue (which has %u entries)\n", |
374 | ntohs (msg->type), | 374 | ntohs (msg->type), ntohs (msg->size), |
375 | ntohs (msg->size), (unsigned int) nc->queue_length); | 375 | (unsigned int) nc->queue_length); |
376 | #endif | 376 | #endif |
377 | memcpy (&pml[1], msg, size); | 377 | memcpy (&pml[1], msg, size); |
378 | /* append */ | 378 | /* append */ |
379 | GNUNET_CONTAINER_DLL_insert_tail (client->pending_head, | 379 | GNUNET_CONTAINER_DLL_insert_tail (client->pending_head, client->pending_tail, |
380 | client->pending_tail, pml); | 380 | pml); |
381 | if (client->th == NULL) | 381 | if (client->th == NULL) |
382 | client->th = GNUNET_SERVER_notify_transmit_ready (client->client, | 382 | client->th = |
383 | ntohs | 383 | GNUNET_SERVER_notify_transmit_ready (client->client, |
384 | (client->pending_head-> | 384 | ntohs (client->pending_head->msg-> |
385 | msg->size), | 385 | size), |
386 | GNUNET_TIME_UNIT_FOREVER_REL, | 386 | GNUNET_TIME_UNIT_FOREVER_REL, |
387 | &transmit_message, | 387 | &transmit_message, client); |
388 | client); | ||
389 | } | 388 | } |
390 | 389 | ||
391 | 390 | ||