projects
/
oweals
/
gnunet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
eliminate KX short cut
[oweals/gnunet.git]
/
src
/
testbed
/
testbed_api_operations.c
diff --git
a/src/testbed/testbed_api_operations.c
b/src/testbed/testbed_api_operations.c
index 8bc38747cb349cca9edcef50854de0d376165496..de24517d6a959c2eba983f2c749880707a21aa05 100644
(file)
--- a/
src/testbed/testbed_api_operations.c
+++ b/
src/testbed/testbed_api_operations.c
@@
-1,6
+1,6
@@
/*
This file is part of GNUnet
/*
This file is part of GNUnet
- (C) 2008--2013 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2008--2013 GNUnet e.V.
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
@@
-14,8
+14,8
@@
You should have received a copy of the GNU General Public License
along with GNUnet; see the file COPYING. If not, write to the
You should have received a copy of the GNU General Public License
along with GNUnet; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 5
9 Temple Place - Suite 330
,
- Boston, MA 0211
1-1307
, USA.
+ Free Software Foundation, Inc., 5
1 Franklin Street, Fifth Floor
,
+ Boston, MA 0211
0-1301
, USA.
*/
/**
*/
/**
@@
-400,7
+400,7
@@
static unsigned int n_expired_opqs;
/**
* The id of the task to process the ready queue
*/
/**
* The id of the task to process the ready queue
*/
-
GNUNET_SCHEDULER_TaskIdentifier
process_rq_task_id;
+
struct GNUNET_SCHEDULER_Task *
process_rq_task_id;
/**
/**
@@
-534,10
+534,10
@@
rq_remove (struct GNUNET_TESTBED_Operation *op)
GNUNET_CONTAINER_DLL_remove (rq_head, rq_tail, op->rq_entry);
GNUNET_free (op->rq_entry);
op->rq_entry = NULL;
GNUNET_CONTAINER_DLL_remove (rq_head, rq_tail, op->rq_entry);
GNUNET_free (op->rq_entry);
op->rq_entry = NULL;
- if ( (NULL == rq_head) && (
GNUNET_SCHEDULER_NO_TASK
!= process_rq_task_id) )
+ if ( (NULL == rq_head) && (
NULL
!= process_rq_task_id) )
{
GNUNET_SCHEDULER_cancel (process_rq_task_id);
{
GNUNET_SCHEDULER_cancel (process_rq_task_id);
- process_rq_task_id =
GNUNET_SCHEDULER_NO_TASK
;
+ process_rq_task_id =
NULL
;
}
}
}
}
@@
-549,16
+549,15
@@
rq_remove (struct GNUNET_TESTBED_Operation *op)
* the ready queue.
*
* @param cls NULL
* the ready queue.
*
* @param cls NULL
- * @param tc scheduler task context. Not used.
*/
static void
*/
static void
-process_rq_task (void *cls
, const struct GNUNET_SCHEDULER_TaskContext *tc
)
+process_rq_task (void *cls)
{
struct GNUNET_TESTBED_Operation *op;
struct OperationQueue *queue;
unsigned int cnt;
{
struct GNUNET_TESTBED_Operation *op;
struct OperationQueue *queue;
unsigned int cnt;
- process_rq_task_id =
GNUNET_SCHEDULER_NO_TASK
;
+ process_rq_task_id =
NULL
;
GNUNET_assert (NULL != rq_head);
GNUNET_assert (NULL != (op = rq_head->op));
rq_remove (op);
GNUNET_assert (NULL != rq_head);
GNUNET_assert (NULL != (op = rq_head->op));
rq_remove (op);
@@
-592,7
+591,7
@@
rq_add (struct GNUNET_TESTBED_Operation *op)
rq_entry->op = op;
GNUNET_CONTAINER_DLL_insert_tail (rq_head, rq_tail, rq_entry);
op->rq_entry = rq_entry;
rq_entry->op = op;
GNUNET_CONTAINER_DLL_insert_tail (rq_head, rq_tail, rq_entry);
op->rq_entry = rq_entry;
- if (
GNUNET_SCHEDULER_NO_TASK
== process_rq_task_id)
+ if (
NULL
== process_rq_task_id)
process_rq_task_id = GNUNET_SCHEDULER_add_now (&process_rq_task, NULL);
}
process_rq_task_id = GNUNET_SCHEDULER_add_now (&process_rq_task, NULL);
}
@@
-1258,7
+1257,7
@@
GNUNET_TESTBED_operation_inactivate_ (struct GNUNET_TESTBED_Operation *op)
queues = GNUNET_malloc (ms);
/* Cloning is needed as the operation be released by waiting operations and
hence its nqueues memory ptr will be freed */
queues = GNUNET_malloc (ms);
/* Cloning is needed as the operation be released by waiting operations and
hence its nqueues memory ptr will be freed */
- GNUNET_
assert (NULL != (queues = memcpy (queues, op->queues, ms))
);
+ GNUNET_
memcpy (queues, op->queues, ms
);
for (i = 0; i < nqueues; i++)
recheck_waiting (queues[i]);
GNUNET_free (queues);
for (i = 0; i < nqueues; i++)
recheck_waiting (queues[i]);
GNUNET_free (queues);