[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r34425 - gnunet/src/util
From: |
gnunet |
Subject: |
[GNUnet-SVN] r34425 - gnunet/src/util |
Date: |
Sun, 23 Nov 2014 21:38:01 +0100 |
Author: grothoff
Date: 2014-11-23 21:38:01 +0100 (Sun, 23 Nov 2014)
New Revision: 34425
Modified:
gnunet/src/util/server_nc.c
Log:
-fix indent
Modified: gnunet/src/util/server_nc.c
===================================================================
--- gnunet/src/util/server_nc.c 2014-11-23 20:37:14 UTC (rev 34424)
+++ gnunet/src/util/server_nc.c 2014-11-23 20:38:01 UTC (rev 34425)
@@ -176,7 +176,9 @@
pos);
while (NULL != (pml = pos->pending_head))
{
- GNUNET_CONTAINER_DLL_remove (pos->pending_head, pos->pending_tail, pml);
+ GNUNET_CONTAINER_DLL_remove (pos->pending_head,
+ pos->pending_tail,
+ pml);
GNUNET_free (pml);
pos->num_pending--;
}
@@ -238,7 +240,9 @@
GNUNET_SERVER_client_drop (pos->client);
while (NULL != (pml = pos->pending_head))
{
- GNUNET_CONTAINER_DLL_remove (pos->pending_head, pos->pending_tail, pml);
+ GNUNET_CONTAINER_DLL_remove (pos->pending_head,
+ pos->pending_tail,
+ pml);
GNUNET_free (pml);
pos->num_pending--;
}
@@ -247,7 +251,8 @@
}
if (NULL != nc->server)
GNUNET_SERVER_disconnect_notify_cancel (nc->server,
- &handle_client_disconnect, nc);
+ &handle_client_disconnect,
+ nc);
GNUNET_free (nc);
}
@@ -288,7 +293,9 @@
* @return number of bytes written to buf
*/
static size_t
-transmit_message (void *cls, size_t size, void *buf)
+transmit_message (void *cls,
+ size_t size,
+ void *buf)
{
struct ClientList *cl = cls;
char *cbuf = buf;
@@ -310,10 +317,13 @@
msize = ntohs (pml->msg->size);
if (size < msize)
break;
- GNUNET_CONTAINER_DLL_remove (cl->pending_head, cl->pending_tail, pml);
+ GNUNET_CONTAINER_DLL_remove (cl->pending_head,
+ cl->pending_tail,
+ pml);
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Copying message of type %u and size %u from pending queue to
transmission buffer\n",
- ntohs (pml->msg->type), msize);
+ ntohs (pml->msg->type),
+ msize);
memcpy (&cbuf[ret], pml->msg, msize);
ret += msize;
size -= msize;
@@ -326,7 +336,8 @@
"Have %u messages left in NC queue, will try transmission again\n",
cl->num_pending);
cl->th =
- GNUNET_SERVER_notify_transmit_ready (cl->client, ntohs
(pml->msg->size),
+ GNUNET_SERVER_notify_transmit_ready (cl->client,
+ ntohs (pml->msg->size),
GNUNET_TIME_UNIT_FOREVER_REL,
&transmit_message, cl);
}
@@ -355,7 +366,8 @@
struct PendingMessageList *pml;
uint16_t size;
- if ((client->num_pending > nc->queue_length) && (GNUNET_YES == can_drop))
+ if ( (client->num_pending > nc->queue_length) &&
+ (GNUNET_YES == can_drop) )
{
LOG (GNUNET_ERROR_TYPE_INFO,
"Dropping message of type %u and size %u due to full queue (%u
entries)\n",
@@ -374,10 +386,13 @@
pml->can_drop = can_drop;
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Adding message of type %u and size %u to pending queue (which has %u
entries)\n",
- ntohs (msg->type), ntohs (msg->size), (unsigned int) nc->queue_length);
+ ntohs (msg->type),
+ ntohs (msg->size),
+ (unsigned int) nc->queue_length);
memcpy (&pml[1], msg, size);
/* append */
- GNUNET_CONTAINER_DLL_insert_tail (client->pending_head, client->pending_tail,
+ GNUNET_CONTAINER_DLL_insert_tail (client->pending_head,
+ client->pending_tail,
pml);
if (NULL == client->th)
client->th =
@@ -399,8 +414,7 @@
* @param can_drop can this message be dropped due to queue length limitations
*/
void
-GNUNET_SERVER_notification_context_unicast (struct
- GNUNET_SERVER_NotificationContext
*nc,
+GNUNET_SERVER_notification_context_unicast (struct
GNUNET_SERVER_NotificationContext *nc,
struct GNUNET_SERVER_Client
*client,
const struct GNUNET_MessageHeader
*msg,
int can_drop)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r34425 - gnunet/src/util,
gnunet <=