diff options
author | Bart Polot <bart@net.in.tum.de> | 2013-12-05 14:15:25 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2013-12-05 14:15:25 +0000 |
commit | 44d957c38051c6e778595b74f4a831da8ad1a179 (patch) | |
tree | 235e33b27ba570e6e857f306ff4ed27791d21d14 /src/mesh/test_mesh_small.c | |
parent | b83fc2e7baf2713881c1ff59971e6dbd4609e771 (diff) | |
download | gnunet-44d957c38051c6e778595b74f4a831da8ad1a179.tar.gz gnunet-44d957c38051c6e778595b74f4a831da8ad1a179.zip |
- change mesh channel creation/notification API
Diffstat (limited to 'src/mesh/test_mesh_small.c')
-rw-r--r-- | src/mesh/test_mesh_small.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesh/test_mesh_small.c b/src/mesh/test_mesh_small.c index 49e394f03..e63e343cf 100644 --- a/src/mesh/test_mesh_small.c +++ b/src/mesh/test_mesh_small.c | |||
@@ -536,13 +536,14 @@ static struct GNUNET_MESH_MessageHandler handlers[] = { | |||
536 | * @param channel New handle to the channel. | 536 | * @param channel New handle to the channel. |
537 | * @param initiator Peer that started the channel. | 537 | * @param initiator Peer that started the channel. |
538 | * @param port Port this channel is connected to. | 538 | * @param port Port this channel is connected to. |
539 | * @param options channel option flags | ||
539 | * @return Initial channel context for the channel | 540 | * @return Initial channel context for the channel |
540 | * (can be NULL -- that's not an error). | 541 | * (can be NULL -- that's not an error). |
541 | */ | 542 | */ |
542 | static void * | 543 | static void * |
543 | incoming_channel (void *cls, struct GNUNET_MESH_Channel *channel, | 544 | incoming_channel (void *cls, struct GNUNET_MESH_Channel *channel, |
544 | const struct GNUNET_PeerIdentity *initiator, | 545 | const struct GNUNET_PeerIdentity *initiator, |
545 | uint32_t port) | 546 | uint32_t port, enum MeshOption options) |
546 | { | 547 | { |
547 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 548 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
548 | "Incoming channel from %s to peer %d\n", | 549 | "Incoming channel from %s to peer %d\n", |
@@ -629,7 +630,7 @@ channel_cleaner (void *cls, const struct GNUNET_MESH_Channel *channel, | |||
629 | static void | 630 | static void |
630 | do_test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 631 | do_test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
631 | { | 632 | { |
632 | int rel; | 633 | enum MeshOption flags; |
633 | 634 | ||
634 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test_task\n"); | 635 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test_task\n"); |
635 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "add peer 2\n"); | 636 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "add peer 2\n"); |
@@ -641,14 +642,13 @@ do_test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
641 | GNUNET_SCHEDULER_cancel (disconnect_task); | 642 | GNUNET_SCHEDULER_cancel (disconnect_task); |
642 | } | 643 | } |
643 | 644 | ||
645 | flags = GNUNET_MESH_OPTION_DEFAULT; | ||
644 | if (SPEED_REL == test) | 646 | if (SPEED_REL == test) |
645 | { | 647 | { |
646 | test = SPEED; | 648 | test = SPEED; |
647 | rel = GNUNET_YES; | 649 | flags |= GNUNET_MESH_OPTION_RELIABLE; |
648 | } | 650 | } |
649 | else | 651 | ch = GNUNET_MESH_channel_create (h1, NULL, p_id[1], 1, flags); |
650 | rel = GNUNET_NO; | ||
651 | ch = GNUNET_MESH_channel_create (h1, NULL, p_id[1], 1, GNUNET_NO, rel); | ||
652 | 652 | ||
653 | disconnect_task = GNUNET_SCHEDULER_add_delayed (SHORT_TIME, | 653 | disconnect_task = GNUNET_SCHEDULER_add_delayed (SHORT_TIME, |
654 | &disconnect_mesh_peers, | 654 | &disconnect_mesh_peers, |