[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r14049 - gnunet/src/core
From: |
gnunet |
Subject: |
[GNUnet-SVN] r14049 - gnunet/src/core |
Date: |
Thu, 23 Dec 2010 14:36:11 +0100 |
Author: grothoff
Date: 2010-12-23 14:36:11 +0100 (Thu, 23 Dec 2010)
New Revision: 14049
Modified:
gnunet/src/core/core_api.c
Log:
renamig pending_head/tail to control_pending_head/tail to avoid ambiguity
Modified: gnunet/src/core/core_api.c
===================================================================
--- gnunet/src/core/core_api.c 2010-12-23 13:34:38 UTC (rev 14048)
+++ gnunet/src/core/core_api.c 2010-12-23 13:36:11 UTC (rev 14049)
@@ -212,12 +212,12 @@
/**
* Head of doubly-linked list of pending requests.
*/
- struct ControlMessage *pending_head;
+ struct ControlMessage *control_pending_head;
/**
* Tail of doubly-linked list of pending requests.
*/
- struct ControlMessage *pending_tail;
+ struct ControlMessage *control_pending_tail;
/**
* Head of doubly-linked list of peers that are core-approved
@@ -462,10 +462,10 @@
struct ControlMessage *cm;
struct PeerRecord *pr;
- while (NULL != (cm = h->pending_head))
+ while (NULL != (cm = h->control_pending_head))
{
- GNUNET_CONTAINER_DLL_remove (h->pending_head,
- h->pending_tail,
+ GNUNET_CONTAINER_DLL_remove (h->control_pending_head,
+ h->control_pending_tail,
cm);
if (cm->th != NULL)
cm->th->cm = NULL;
@@ -487,7 +487,7 @@
h->ready_peer_tail,
pr);
- GNUNET_assert (h->pending_head == NULL);
+ GNUNET_assert (h->control_pending_head == NULL);
h->currently_down = GNUNET_YES;
GNUNET_assert (h->reconnect_task == GNUNET_SCHEDULER_NO_TASK);
h->retry_backoff = GNUNET_TIME_relative_min (GNUNET_TIME_UNIT_SECONDS,
@@ -565,9 +565,9 @@
smr->queue_size = htonl (pr->queue_size);
smr->size = htons (th->msize);
smr->smr_id = htons (th->smr_id = pr->smr_id_gen++);
- GNUNET_CONTAINER_DLL_insert_after (h->pending_head,
- h->pending_tail,
- h->pending_tail,
+ GNUNET_CONTAINER_DLL_insert_after (h->control_pending_head,
+ h->control_pending_tail,
+ h->control_pending_tail,
cm);
#if DEBUG_CORE
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -647,7 +647,7 @@
return 0;
}
/* first check for control messages */
- if (NULL != (cm = h->pending_head))
+ if (NULL != (cm = h->control_pending_head))
{
hdr = (const struct GNUNET_MessageHeader*) &cm[1];
msize = ntohs (hdr->size);
@@ -663,8 +663,8 @@
(unsigned int) ntohs (hdr->type));
#endif
memcpy (buf, hdr, msize);
- GNUNET_CONTAINER_DLL_remove (h->pending_head,
- h->pending_tail,
+ GNUNET_CONTAINER_DLL_remove (h->control_pending_head,
+ h->control_pending_tail,
cm);
if (cm->th != NULL)
cm->th->cm = NULL;
@@ -777,8 +777,8 @@
#endif
return;
}
- if (h->pending_head != NULL)
- msize = ntohs (((struct GNUNET_MessageHeader*)
&h->pending_head[1])->size);
+ if (h->control_pending_head != NULL)
+ msize = ntohs (((struct GNUNET_MessageHeader*)
&h->control_pending_head[1])->size);
else if (h->ready_peer_head != NULL)
msize = h->ready_peer_head->pending_head->msize + sizeof (struct
SendMessage);
else
@@ -1349,8 +1349,8 @@
ts = (uint16_t *) &init[1];
for (hpos = 0; hpos < h->hcnt; hpos++)
ts[hpos] = htons (h->handlers[hpos].type);
- GNUNET_CONTAINER_DLL_insert (h->pending_head,
- h->pending_tail,
+ GNUNET_CONTAINER_DLL_insert (h->control_pending_head,
+ h->control_pending_tail,
cm);
trigger_next_request (h, GNUNET_YES);
}
@@ -1459,10 +1459,10 @@
GNUNET_SCHEDULER_cancel (handle->reconnect_task);
handle->reconnect_task = GNUNET_SCHEDULER_NO_TASK;
}
- while (NULL != (cm = handle->pending_head))
+ while (NULL != (cm = handle->control_pending_head))
{
- GNUNET_CONTAINER_DLL_remove (handle->pending_head,
- handle->pending_tail,
+ GNUNET_CONTAINER_DLL_remove (handle->control_pending_head,
+ handle->control_pending_tail,
cm);
if (cm->th != NULL)
cm->th->cm = NULL;
@@ -1625,8 +1625,8 @@
if (th->cm != NULL)
{
/* we're currently in the control queue, remove */
- GNUNET_CONTAINER_DLL_remove (h->pending_head,
- h->pending_tail,
+ GNUNET_CONTAINER_DLL_remove (h->control_pending_head,
+ h->control_pending_tail,
th->cm);
GNUNET_free (th->cm);
}
@@ -1745,8 +1745,8 @@
msg->reserved = htonl (0);
msg->timeout = GNUNET_TIME_relative_hton (timeout);
msg->peer = *peer;
- GNUNET_CONTAINER_DLL_insert (h->pending_head,
- h->pending_tail,
+ GNUNET_CONTAINER_DLL_insert (h->control_pending_head,
+ h->control_pending_tail,
cm);
ret = GNUNET_malloc (sizeof (struct GNUNET_CORE_PeerRequestHandle));
ret->h = h;
@@ -1759,7 +1759,7 @@
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Queueing REQUEST_CONNECT request\n");
#endif
- if (h->pending_head == cm)
+ if (h->control_pending_head == cm)
trigger_next_request (h, GNUNET_NO);
return ret;
}
@@ -1777,8 +1777,8 @@
struct GNUNET_CORE_Handle *h = req->h;
struct ControlMessage *cm = req->cm;
- GNUNET_CONTAINER_DLL_remove (h->pending_head,
- h->pending_tail,
+ GNUNET_CONTAINER_DLL_remove (h->control_pending_head,
+ h->control_pending_tail,
cm);
GNUNET_free (cm);
GNUNET_free (req);
@@ -1909,12 +1909,12 @@
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Queueing CHANGE PREFERENCE request\n");
#endif
- GNUNET_CONTAINER_DLL_insert (h->pending_head,
- h->pending_tail,
+ GNUNET_CONTAINER_DLL_insert (h->control_pending_head,
+ h->control_pending_tail,
cm);
pr->pcic = info;
pr->pcic_cls = info_cls;
- if (h->pending_head == cm)
+ if (h->control_pending_head == cm)
trigger_next_request (h, GNUNET_NO);
return irc;
}
@@ -1939,8 +1939,8 @@
if (irc->cm != NULL)
{
- GNUNET_CONTAINER_DLL_remove (h->pending_head,
- h->pending_tail,
+ GNUNET_CONTAINER_DLL_remove (h->control_pending_head,
+ h->control_pending_tail,
irc->cm);
GNUNET_free (irc->cm);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r14049 - gnunet/src/core,
gnunet <=