[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r20346 - gnunet/src/namestore
From: |
gnunet |
Subject: |
[GNUnet-SVN] r20346 - gnunet/src/namestore |
Date: |
Wed, 7 Mar 2012 17:06:15 +0100 |
Author: wachs
Date: 2012-03-07 17:06:14 +0100 (Wed, 07 Mar 2012)
New Revision: 20346
Modified:
gnunet/src/namestore/namestore_api.c
Log:
- fix remomve callboack order
Modified: gnunet/src/namestore/namestore_api.c
===================================================================
--- gnunet/src/namestore/namestore_api.c 2012-03-07 15:50:44 UTC (rev
20345)
+++ gnunet/src/namestore/namestore_api.c 2012-03-07 16:06:14 UTC (rev
20346)
@@ -220,6 +220,11 @@
"LOOKUP_NAME_RESPONSE");
struct GNUNET_NAMESTORE_Handle *h = qe->nsh;
+
+ /* Operation done, remove */
+ GNUNET_CONTAINER_DLL_remove(h->op_head, h->op_tail, qe);
+
+
char *name;
char * rd_tmp;
@@ -276,9 +281,6 @@
{
qe->proc (qe->proc_cls, public_key_tmp, expire, name, rd_count, (rd_count
> 0) ? rd : NULL, signature);
}
-
- /* Operation done, remove */
- GNUNET_CONTAINER_DLL_remove(h->op_head, h->op_tail, qe);
GNUNET_free (qe);
}
@@ -290,7 +292,11 @@
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received `%s' \n",
"RECORD_PUT_RESPONSE");
+
struct GNUNET_NAMESTORE_Handle *h = qe->nsh;
+ /* Operation done, remove */
+ GNUNET_CONTAINER_DLL_remove(h->op_head, h->op_tail, qe);
+
int res = ntohl (msg->op_result);
if (res == GNUNET_OK)
@@ -314,9 +320,6 @@
return;
}
- /* Operation done, remove */
- GNUNET_CONTAINER_DLL_remove(h->op_head, h->op_tail, qe);
-
GNUNET_free (qe);
}
@@ -328,9 +331,12 @@
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received `%s' \n",
"RECORD_CREATE_RESPONSE");
+
struct GNUNET_NAMESTORE_Handle *h = qe->nsh;
+ /* Operation done, remove */
+ GNUNET_CONTAINER_DLL_remove(h->op_head, h->op_tail, qe);
+
int res = ntohl (msg->op_result);
-
if (res == GNUNET_YES)
{
if (qe->cont != NULL)
@@ -354,9 +360,6 @@
}
}
- /* Operation done, remove */
- GNUNET_CONTAINER_DLL_remove(h->op_head, h->op_tail, qe);
-
GNUNET_free (qe);
}
@@ -370,8 +373,11 @@
"RECORD_REMOVE_RESPONSE");
struct GNUNET_NAMESTORE_Handle *h = qe->nsh;
+ /* Operation done, remove */
+ GNUNET_CONTAINER_DLL_remove(h->op_head, h->op_tail, qe);
+
+
int res = ntohl (msg->op_result);
-
/**
* result:
* 0 : successful
@@ -420,9 +426,6 @@
break;
}
- /* Operation done, remove */
- GNUNET_CONTAINER_DLL_remove(h->op_head, h->op_tail, qe);
-
GNUNET_free (qe);
}
@@ -435,6 +438,9 @@
"ZONE_TO_NAME_RESPONSE");
struct GNUNET_NAMESTORE_Handle *h = qe->nsh;
+ /* Operation done, remove */
+ GNUNET_CONTAINER_DLL_remove(h->op_head, h->op_tail, qe);
+
int res = ntohs (msg->res);
struct GNUNET_TIME_Absolute expire;
@@ -478,8 +484,6 @@
else
GNUNET_break_op (0);
- /* Operation done, remove */
- GNUNET_CONTAINER_DLL_remove(h->op_head, h->op_tail, qe);
GNUNET_free (qe);
}
@@ -582,10 +586,11 @@
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Zone iteration is completed!\n");
+ GNUNET_CONTAINER_DLL_remove(ze->h->z_head, ze->h->z_tail, ze);
+
if (ze->proc != NULL)
ze->proc(ze->proc_cls, NULL, GNUNET_TIME_absolute_get_zero (), NULL , 0,
NULL, NULL);
- GNUNET_CONTAINER_DLL_remove(ze->h->z_head, ze->h->z_tail, ze);
GNUNET_free (ze);
return;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r20346 - gnunet/src/namestore,
gnunet <=