[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r24562 - in gnunet/src: fs gns include mesh testbed
From: |
gnunet |
Subject: |
[GNUnet-SVN] r24562 - in gnunet/src: fs gns include mesh testbed |
Date: |
Fri, 26 Oct 2012 14:58:46 +0200 |
Author: harsha
Date: 2012-10-26 14:58:46 +0200 (Fri, 26 Oct 2012)
New Revision: 24562
Modified:
gnunet/src/fs/fs_test_lib.c
gnunet/src/gns/test_gns_dht_three_peers.c
gnunet/src/include/gnunet_testbed_service.h
gnunet/src/mesh/gnunet-regex-profiler.c
gnunet/src/testbed/gnunet-service-testbed.c
gnunet/src/testbed/gnunet-testbed-profiler.c
gnunet/src/testbed/testbed_api_testbed.c
gnunet/src/testbed/testbed_api_topology.c
Log:
removed GNUNET_TESTBED_operation_cancel
Modified: gnunet/src/fs/fs_test_lib.c
===================================================================
--- gnunet/src/fs/fs_test_lib.c 2012-10-26 12:22:21 UTC (rev 24561)
+++ gnunet/src/fs/fs_test_lib.c 2012-10-26 12:58:46 UTC (rev 24562)
@@ -212,7 +212,7 @@
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Timeout while trying to publish data\n");
if (NULL == po->fs)
- GNUNET_TESTBED_operation_cancel (po->fs_op);
+ GNUNET_TESTBED_operation_done (po->fs_op);
else
GNUNET_TESTBED_operation_done (po->fs_op);
GNUNET_FS_publish_stop (po->publish_context);
@@ -486,7 +486,7 @@
dop->download_cont_cls,
GNUNET_SCHEDULER_REASON_TIMEOUT);
if (NULL == dop->fs)
- GNUNET_TESTBED_operation_cancel (dop->fs_op);
+ GNUNET_TESTBED_operation_done (dop->fs_op);
else
GNUNET_TESTBED_operation_done (dop->fs_op);
GNUNET_FS_uri_destroy (dop->uri);
Modified: gnunet/src/gns/test_gns_dht_three_peers.c
===================================================================
--- gnunet/src/gns/test_gns_dht_three_peers.c 2012-10-26 12:22:21 UTC (rev
24561)
+++ gnunet/src/gns/test_gns_dht_three_peers.c 2012-10-26 12:58:46 UTC (rev
24562)
@@ -107,12 +107,12 @@
if (NULL != get_cfg_ops[c])
{
- GNUNET_TESTBED_operation_cancel(get_cfg_ops[c]);
+ GNUNET_TESTBED_operation_done(get_cfg_ops[c]);
get_cfg_ops[c] = NULL;
}
if (NULL != connect_ops[c])
{
- GNUNET_TESTBED_operation_cancel(connect_ops[c]);
+ GNUNET_TESTBED_operation_done(connect_ops[c]);
connect_ops[c] = NULL;
}
if (NULL != cfg_handles[c])
Modified: gnunet/src/include/gnunet_testbed_service.h
===================================================================
--- gnunet/src/include/gnunet_testbed_service.h 2012-10-26 12:22:21 UTC (rev
24561)
+++ gnunet/src/include/gnunet_testbed_service.h 2012-10-26 12:58:46 UTC (rev
24562)
@@ -1188,26 +1188,25 @@
/**
- * Cancel a pending operation. Releases all resources
- * of the operation and will ensure that no event
- * is generated for the operation. Does NOT guarantee
- * that the operation will be fully undone (or that
- * nothing ever happened).
+ * This function is used to signal that the event information (struct
+ * GNUNET_TESTBED_EventInformation) from an operation has been fully processed
+ * i.e. if the event callback is ever called for this operation. If the event
+ * callback for this operation has not yet been called, calling this function
+ * cancels the operation, frees its resources and ensures the no event is
+ * generated with respect to this operation. Note that however cancelling an
+ * operation does NOT guarantee that the operation will be fully undone (or
that
+ * nothing ever happened).
*
- * @param operation operation to cancel
- */
-void
-GNUNET_TESTBED_operation_cancel (struct GNUNET_TESTBED_Operation *operation);
+ * This function MUST be called for every operation to fully remove the
+ * operation from the operation queue. After calling this function, if
+ * operation is completed and its event information is of type
+ * GNUNET_TESTBED_ET_OPERATION_FINISHED, the 'op_result' becomes invalid (!).
-
-/**
- * Signal that the information from an operation has been fully
- * processed. This function MUST be called for each event
- * of type 'operation_finished' to fully remove the operation
- * from the operation queue. After calling this function, the
- * 'op_result' becomes invalid (!).
+ * If the operation is generated from GNUNET_TESTBED_service_connect() then
+ * calling this function on such as operation calls the disconnect adapter if
+ * the connect adapter was ever called.
*
- * @param operation operation to signal completion for
+ * @param operation operation to signal completion or cancellation
*/
void
GNUNET_TESTBED_operation_done (struct GNUNET_TESTBED_Operation *operation);
Modified: gnunet/src/mesh/gnunet-regex-profiler.c
===================================================================
--- gnunet/src/mesh/gnunet-regex-profiler.c 2012-10-26 12:22:21 UTC (rev
24561)
+++ gnunet/src/mesh/gnunet-regex-profiler.c 2012-10-26 12:58:46 UTC (rev
24562)
@@ -395,9 +395,9 @@
for (peer_cnt = 0; peer_cnt < num_peers; peer_cnt++)
{
if (NULL != peers[peer_cnt].mesh_op_handle)
- GNUNET_TESTBED_operation_cancel (peers[peer_cnt].mesh_op_handle);
+ GNUNET_TESTBED_operation_done (peers[peer_cnt].mesh_op_handle);
if (NULL != peers[peer_cnt].stats_op_handle)
- GNUNET_TESTBED_operation_cancel (peers[peer_cnt].stats_op_handle);
+ GNUNET_TESTBED_operation_done (peers[peer_cnt].stats_op_handle);
}
for (search_str_cnt = 0; search_str_cnt < num_search_strings;
search_str_cnt++)
{
@@ -411,14 +411,14 @@
if (NULL != reg_handle)
GNUNET_TESTBED_cancel_registration (reg_handle);
if (NULL != topology_op)
- GNUNET_TESTBED_operation_cancel (topology_op);
+ GNUNET_TESTBED_operation_done (topology_op);
for (nhost = 0; nhost < num_hosts; nhost++)
if (NULL != hosts[nhost])
GNUNET_TESTBED_host_destroy (hosts[nhost]);
GNUNET_free_non_null (hosts);
while (NULL != (dll_op = dll_op_head))
{
- GNUNET_TESTBED_operation_cancel (dll_op->op);
+ GNUNET_TESTBED_operation_done (dll_op->op);
GNUNET_CONTAINER_DLL_remove (dll_op_head, dll_op_tail, dll_op);
GNUNET_free (dll_op);
}
Modified: gnunet/src/testbed/gnunet-service-testbed.c
===================================================================
--- gnunet/src/testbed/gnunet-service-testbed.c 2012-10-26 12:22:21 UTC (rev
24561)
+++ gnunet/src/testbed/gnunet-service-testbed.c 2012-10-26 12:58:46 UTC (rev
24562)
@@ -3672,7 +3672,7 @@
cleanup_focc (focc);
}
if (NULL != rhc->sub_op)
- GNUNET_TESTBED_operation_cancel (rhc->sub_op);
+ GNUNET_TESTBED_operation_done (rhc->sub_op);
if (NULL != rhc->client)
GNUNET_SERVER_client_drop (rhc->client);
GNUNET_free (value);
Modified: gnunet/src/testbed/gnunet-testbed-profiler.c
===================================================================
--- gnunet/src/testbed/gnunet-testbed-profiler.c 2012-10-26 12:22:21 UTC
(rev 24561)
+++ gnunet/src/testbed/gnunet-testbed-profiler.c 2012-10-26 12:58:46 UTC
(rev 24562)
@@ -258,14 +258,14 @@
if (NULL != reg_handle)
GNUNET_TESTBED_cancel_registration (reg_handle);
if (NULL != topology_op)
- GNUNET_TESTBED_operation_cancel (topology_op);
+ GNUNET_TESTBED_operation_done (topology_op);
for (nhost = 0; nhost < num_hosts; nhost++)
if (NULL != hosts[nhost])
GNUNET_TESTBED_host_destroy (hosts[nhost]);
GNUNET_free_non_null (hosts);
while (NULL != (dll_op = dll_op_head))
{
- GNUNET_TESTBED_operation_cancel (dll_op->op);
+ GNUNET_TESTBED_operation_done (dll_op->op);
GNUNET_CONTAINER_DLL_remove (dll_op_head, dll_op_tail, dll_op);
GNUNET_free (dll_op);
}
Modified: gnunet/src/testbed/testbed_api_testbed.c
===================================================================
--- gnunet/src/testbed/testbed_api_testbed.c 2012-10-26 12:22:21 UTC (rev
24561)
+++ gnunet/src/testbed/testbed_api_testbed.c 2012-10-26 12:58:46 UTC (rev
24562)
@@ -271,7 +271,7 @@
_("Some operations are still pending. Cancelling them\n"));
while (NULL != (dll_op = rc->dll_op_head))
{
- GNUNET_TESTBED_operation_cancel (dll_op->op);
+ GNUNET_TESTBED_operation_done (dll_op->op);
GNUNET_CONTAINER_DLL_remove (rc->dll_op_head, rc->dll_op_tail, dll_op);
GNUNET_free (dll_op);
}
Modified: gnunet/src/testbed/testbed_api_topology.c
===================================================================
--- gnunet/src/testbed/testbed_api_topology.c 2012-10-26 12:22:21 UTC (rev
24561)
+++ gnunet/src/testbed/testbed_api_topology.c 2012-10-26 12:58:46 UTC (rev
24562)
@@ -177,7 +177,7 @@
{
for (p = 0; p < tc->link_array_size; p++)
if (NULL != tc->link_array[p].op)
- GNUNET_TESTBED_operation_cancel (tc->link_array[p].op);
+ GNUNET_TESTBED_operation_done (tc->link_array[p].op);
GNUNET_free (tc->link_array);
}
GNUNET_free (tc);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r24562 - in gnunet/src: fs gns include mesh testbed,
gnunet <=