projects
/
oweals
/
gnunet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Forget to commit some files
[oweals/gnunet.git]
/
src
/
testbed
/
gnunet-service-testbed_barriers.c
diff --git
a/src/testbed/gnunet-service-testbed_barriers.c
b/src/testbed/gnunet-service-testbed_barriers.c
index 634f0a07a89136f943b57b7fbd3499fa276452d3..4450ddf777c2d59afd01f22e993fdda364be51af 100644
(file)
--- a/
src/testbed/gnunet-service-testbed_barriers.c
+++ b/
src/testbed/gnunet-service-testbed_barriers.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 Christian Grothoff (and other contributing authors)
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.
*/
/**
*/
/**
@@
-199,7
+199,7
@@
struct Barrier
/**
* Identifier for the timeout task
*/
/**
* Identifier for the timeout task
*/
-
GNUNET_SCHEDULER_TaskIdentifier
tout_task;
+
struct GNUNET_SCHEDULER_Task *
tout_task;
/**
* The status of this barrier
/**
* The status of this barrier
@@
-271,7
+271,6
@@
transmit_ready_cb (void *cls, size_t size, void *buf)
size_t wrote;
ctx->tx = NULL;
size_t wrote;
ctx->tx = NULL;
- wrote = 0;
if ((0 == size) || (NULL == buf))
{
GNUNET_assert (NULL != ctx->client);
if ((0 == size) || (NULL == buf))
{
GNUNET_assert (NULL != ctx->client);
@@
-307,7
+306,7
@@
queue_message (struct ClientCtx *ctx, struct GNUNET_MessageHeader *msg)
struct MessageQueue *mq;
struct GNUNET_SERVER_Client *client = ctx->client;
struct MessageQueue *mq;
struct GNUNET_SERVER_Client *client = ctx->client;
- mq = GNUNET_
malloc (sizeof (struct MessageQueue)
);
+ mq = GNUNET_
new (struct MessageQueue
);
mq->msg = msg;
LOG_DEBUG ("Queueing message of type %u, size %u for sending\n",
ntohs (msg->type), ntohs (msg->size));
mq->msg = msg;
LOG_DEBUG ("Queueing message of type %u, size %u for sending\n",
ntohs (msg->type), ntohs (msg->size));
@@
-495,7
+494,7
@@
handle_barrier_wait (void *cls, struct GNUNET_SERVER_Client *client,
client_ctx = GNUNET_SERVER_client_get_user_context (client, struct ClientCtx);
if (NULL == client_ctx)
{
client_ctx = GNUNET_SERVER_client_get_user_context (client, struct ClientCtx);
if (NULL == client_ctx)
{
- client_ctx = GNUNET_
malloc (sizeof (struct ClientCtx)
);
+ client_ctx = GNUNET_
new (struct ClientCtx
);
client_ctx->client = client;
GNUNET_SERVER_client_keep (client);
client_ctx->barrier = barrier;
client_ctx->client = client;
GNUNET_SERVER_client_keep (client);
client_ctx->barrier = barrier;
@@
-748,7
+747,7
@@
GST_handle_barrier_init (void *cls, struct GNUNET_SERVER_Client *client,
GNUNET_SERVER_receive_done (client, GNUNET_OK);
return;
}
GNUNET_SERVER_receive_done (client, GNUNET_OK);
return;
}
- barrier = GNUNET_
malloc (sizeof (struct Barrier)
);
+ barrier = GNUNET_
new (struct Barrier
);
(void) memcpy (&barrier->hash, &hash, sizeof (struct GNUNET_HashCode));
barrier->quorum = msg->quorum;
barrier->name = name;
(void) memcpy (&barrier->hash, &hash, sizeof (struct GNUNET_HashCode));
barrier->quorum = msg->quorum;
barrier->name = name;
@@
-770,7
+769,7
@@
GST_handle_barrier_init (void *cls, struct GNUNET_SERVER_Client *client,
GNUNET_break (0);/* May happen when we are connecting to the controller */
continue;
}
GNUNET_break (0);/* May happen when we are connecting to the controller */
continue;
}
- wrapper = GNUNET_
malloc (sizeof (struct WBarrier)
);
+ wrapper = GNUNET_
new (struct WBarrier
);
wrapper->barrier = barrier;
GNUNET_CONTAINER_DLL_insert_tail (barrier->whead, barrier->wtail, wrapper);
wrapper->hbarrier = GNUNET_TESTBED_barrier_init_ (slave->controller,
wrapper->barrier = barrier;
GNUNET_CONTAINER_DLL_insert_tail (barrier->whead, barrier->wtail, wrapper);
wrapper->hbarrier = GNUNET_TESTBED_barrier_init_ (slave->controller,