diff options
Diffstat (limited to 'src/mesh/gnunet-service-mesh.c')
-rw-r--r-- | src/mesh/gnunet-service-mesh.c | 94 |
1 files changed, 47 insertions, 47 deletions
diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c index 422e5af1f..afa64f1fd 100644 --- a/src/mesh/gnunet-service-mesh.c +++ b/src/mesh/gnunet-service-mesh.c | |||
@@ -511,7 +511,7 @@ struct MeshTunnel | |||
511 | 511 | ||
512 | /** | 512 | /** |
513 | * Struct containing information about a client of the service | 513 | * Struct containing information about a client of the service |
514 | * | 514 | * |
515 | * TODO: add a list of 'waiting' ports | 515 | * TODO: add a list of 'waiting' ports |
516 | */ | 516 | */ |
517 | struct MeshClient | 517 | struct MeshClient |
@@ -626,7 +626,7 @@ static unsigned long long dht_replication_level; | |||
626 | static unsigned long long max_tunnels; | 626 | static unsigned long long max_tunnels; |
627 | 627 | ||
628 | /** | 628 | /** |
629 | * How many messages *in total* are we willing to queue, divided by number of | 629 | * How many messages *in total* are we willing to queue, divided by number of |
630 | * tunnels to get tunnel queue size. | 630 | * tunnels to get tunnel queue size. |
631 | */ | 631 | */ |
632 | static unsigned long long max_msgs_queue; | 632 | static unsigned long long max_msgs_queue; |
@@ -879,7 +879,7 @@ tunnel_bck_keepalive (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); | |||
879 | * @brief Use the given path for the tunnel. | 879 | * @brief Use the given path for the tunnel. |
880 | * Update the next and prev hops (and RCs). | 880 | * Update the next and prev hops (and RCs). |
881 | * (Re)start the path refresh in case the tunnel is locally owned. | 881 | * (Re)start the path refresh in case the tunnel is locally owned. |
882 | * | 882 | * |
883 | * @param t Tunnel to update. | 883 | * @param t Tunnel to update. |
884 | * @param p Path to use. | 884 | * @param p Path to use. |
885 | */ | 885 | */ |
@@ -888,10 +888,10 @@ tunnel_use_path (struct MeshTunnel *t, struct MeshPeerPath *p); | |||
888 | 888 | ||
889 | /** | 889 | /** |
890 | * Tunnel is empty: destroy it. | 890 | * Tunnel is empty: destroy it. |
891 | * | 891 | * |
892 | * Notifies all participants (peers, cleints) about the destruction. | 892 | * Notifies all participants (peers, cleints) about the destruction. |
893 | * | 893 | * |
894 | * @param t Tunnel to destroy. | 894 | * @param t Tunnel to destroy. |
895 | */ | 895 | */ |
896 | static void | 896 | static void |
897 | tunnel_destroy_empty (struct MeshTunnel *t); | 897 | tunnel_destroy_empty (struct MeshTunnel *t); |
@@ -915,12 +915,12 @@ tunnel_destroy (struct MeshTunnel *t); | |||
915 | 915 | ||
916 | /** | 916 | /** |
917 | * @brief Queue and pass message to core when possible. | 917 | * @brief Queue and pass message to core when possible. |
918 | * | 918 | * |
919 | * If type is payload (UNICAST, TO_ORIGIN, MULTICAST) checks for queue status | 919 | * If type is payload (UNICAST, TO_ORIGIN, MULTICAST) checks for queue status |
920 | * and accounts for it. In case the queue is full, the message is dropped and | 920 | * and accounts for it. In case the queue is full, the message is dropped and |
921 | * a break issued. | 921 | * a break issued. |
922 | * | 922 | * |
923 | * Otherwise, message is treated as internal and allowed to go regardless of | 923 | * Otherwise, message is treated as internal and allowed to go regardless of |
924 | * queue status. | 924 | * queue status. |
925 | * | 925 | * |
926 | * @param cls Closure (@c type dependant). It will be used by queue_send to | 926 | * @param cls Closure (@c type dependant). It will be used by queue_send to |
@@ -1169,7 +1169,7 @@ send_local_tunnel_destroy (struct MeshTunnel *t, int fwd) | |||
1169 | 1169 | ||
1170 | /** | 1170 | /** |
1171 | * Build a local ACK message and send it to a local client. | 1171 | * Build a local ACK message and send it to a local client. |
1172 | * | 1172 | * |
1173 | * @param t Tunnel on which to send the ACK. | 1173 | * @param t Tunnel on which to send the ACK. |
1174 | * @param c Client to whom send the ACK. | 1174 | * @param c Client to whom send the ACK. |
1175 | * @param is_fwd Set to GNUNET_YES for FWD ACK (dest->owner) | 1175 | * @param is_fwd Set to GNUNET_YES for FWD ACK (dest->owner) |
@@ -1310,7 +1310,7 @@ send_path_create (struct MeshTunnel *t) | |||
1310 | * @param t Tunnel which to confirm. | 1310 | * @param t Tunnel which to confirm. |
1311 | */ | 1311 | */ |
1312 | static void | 1312 | static void |
1313 | send_path_ack (struct MeshTunnel *t) | 1313 | send_path_ack (struct MeshTunnel *t) |
1314 | { | 1314 | { |
1315 | struct MeshPeer *neighbor; | 1315 | struct MeshPeer *neighbor; |
1316 | 1316 | ||
@@ -1327,7 +1327,7 @@ send_path_ack (struct MeshTunnel *t) | |||
1327 | 1327 | ||
1328 | /** | 1328 | /** |
1329 | * Build an ACK message and queue it to send to the given peer. | 1329 | * Build an ACK message and queue it to send to the given peer. |
1330 | * | 1330 | * |
1331 | * @param t Tunnel on which to send the ACK. | 1331 | * @param t Tunnel on which to send the ACK. |
1332 | * @param peer Peer to whom send the ACK. | 1332 | * @param peer Peer to whom send the ACK. |
1333 | * @param ack Value of the ACK. | 1333 | * @param ack Value of the ACK. |
@@ -1536,7 +1536,7 @@ peer_get_short (const GNUNET_PEER_Id peer) | |||
1536 | * | 1536 | * |
1537 | * @param pi Peer we want to poll. | 1537 | * @param pi Peer we want to poll. |
1538 | * @param t Tunnel about which we want to poll. | 1538 | * @param t Tunnel about which we want to poll. |
1539 | * | 1539 | * |
1540 | * @return PID to use, either last sent or first_in_queue - 1 | 1540 | * @return PID to use, either last sent or first_in_queue - 1 |
1541 | */ | 1541 | */ |
1542 | static uint32_t | 1542 | static uint32_t |
@@ -1571,7 +1571,7 @@ peer_get_first_payload_pid (struct MeshPeer *p, struct MeshTunnel *t) | |||
1571 | 1571 | ||
1572 | /** | 1572 | /** |
1573 | * Choose the best path towards a peer considering the tunnel properties. | 1573 | * Choose the best path towards a peer considering the tunnel properties. |
1574 | * | 1574 | * |
1575 | * @param peer The destination peer. | 1575 | * @param peer The destination peer. |
1576 | * @param t The tunnel the path is for. | 1576 | * @param t The tunnel the path is for. |
1577 | * | 1577 | * |
@@ -1626,7 +1626,7 @@ peer_connect (struct MeshPeer *peer, struct MeshTunnel *t) | |||
1626 | 1626 | ||
1627 | GNUNET_PEER_resolve (peer->id, &id); | 1627 | GNUNET_PEER_resolve (peer->id, &id); |
1628 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1628 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1629 | "Starting DHT GET for peer %s\n", | 1629 | "Starting DHT GET for peer %s\n", |
1630 | GNUNET_i2s (&id)); | 1630 | GNUNET_i2s (&id)); |
1631 | GNUNET_CRYPTO_hash (&id, sizeof (my_full_id), &phash); | 1631 | GNUNET_CRYPTO_hash (&id, sizeof (my_full_id), &phash); |
1632 | peer->dhtget = GNUNET_DHT_get_start (dht_handle, /* handle */ | 1632 | peer->dhtget = GNUNET_DHT_get_start (dht_handle, /* handle */ |
@@ -1947,7 +1947,7 @@ peer_add_path_to_origin (struct MeshPeer *peer_info, | |||
1947 | /** | 1947 | /** |
1948 | * Add a tunnel to the list of tunnels a peer participates in. | 1948 | * Add a tunnel to the list of tunnels a peer participates in. |
1949 | * Update the tunnel's destination. | 1949 | * Update the tunnel's destination. |
1950 | * | 1950 | * |
1951 | * @param p Peer to add to. | 1951 | * @param p Peer to add to. |
1952 | * @param t Tunnel to add. | 1952 | * @param t Tunnel to add. |
1953 | */ | 1953 | */ |
@@ -1968,7 +1968,7 @@ peer_add_tunnel (struct MeshPeer *p, struct MeshTunnel *t) | |||
1968 | /** | 1968 | /** |
1969 | * Remove a tunnel from the list of tunnels a peer participates in. | 1969 | * Remove a tunnel from the list of tunnels a peer participates in. |
1970 | * Free the tunnel's destination. | 1970 | * Free the tunnel's destination. |
1971 | * | 1971 | * |
1972 | * @param p Peer to clean. | 1972 | * @param p Peer to clean. |
1973 | * @param t Tunnel to remove. | 1973 | * @param t Tunnel to remove. |
1974 | */ | 1974 | */ |
@@ -2034,7 +2034,7 @@ tunnel_poll (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
2034 | GNUNET_break (0); | 2034 | GNUNET_break (0); |
2035 | return; | 2035 | return; |
2036 | } | 2036 | } |
2037 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " *** peer: %s!\n", | 2037 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " *** peer: %s!\n", |
2038 | GNUNET_i2s(GNUNET_PEER_resolve2 (peer))); | 2038 | GNUNET_i2s(GNUNET_PEER_resolve2 (peer))); |
2039 | if (0 == peer) | 2039 | if (0 == peer) |
2040 | { | 2040 | { |
@@ -2274,7 +2274,7 @@ tunnel_change_state (struct MeshTunnel *t, enum MeshTunnelState state) | |||
2274 | 2274 | ||
2275 | /** | 2275 | /** |
2276 | * Add a client to a tunnel, initializing all needed data structures. | 2276 | * Add a client to a tunnel, initializing all needed data structures. |
2277 | * | 2277 | * |
2278 | * @param t Tunnel to which add the client. | 2278 | * @param t Tunnel to which add the client. |
2279 | * @param c Client which to add to the tunnel. | 2279 | * @param c Client which to add to the tunnel. |
2280 | */ | 2280 | */ |
@@ -2368,13 +2368,13 @@ tunnel_notify_connection_broken (struct MeshTunnel *t, GNUNET_PEER_Id p1, | |||
2368 | // { | 2368 | // { |
2369 | // return; | 2369 | // return; |
2370 | // } | 2370 | // } |
2371 | // | 2371 | // |
2372 | // if (tree_get_predecessor (t->tree) != 0) | 2372 | // if (tree_get_predecessor (t->tree) != 0) |
2373 | // { | 2373 | // { |
2374 | // /* We are the peer still connected, notify owner of the disconnection. */ | 2374 | // /* We are the peer still connected, notify owner of the disconnection. */ |
2375 | // struct GNUNET_MESH_PathBroken msg; | 2375 | // struct GNUNET_MESH_PathBroken msg; |
2376 | // struct GNUNET_PeerIdentity neighbor; | 2376 | // struct GNUNET_PeerIdentity neighbor; |
2377 | // | 2377 | // |
2378 | // msg.header.size = htons (sizeof (msg)); | 2378 | // msg.header.size = htons (sizeof (msg)); |
2379 | // msg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_PATH_BROKEN); | 2379 | // msg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_PATH_BROKEN); |
2380 | // GNUNET_PEER_resolve (t->id.oid, &msg.oid); | 2380 | // GNUNET_PEER_resolve (t->id.oid, &msg.oid); |
@@ -2390,7 +2390,7 @@ tunnel_notify_connection_broken (struct MeshTunnel *t, GNUNET_PEER_Id p1, | |||
2390 | 2390 | ||
2391 | /** | 2391 | /** |
2392 | * Send an end-to-end FWD ACK message for the most recent in-sequence payload. | 2392 | * Send an end-to-end FWD ACK message for the most recent in-sequence payload. |
2393 | * | 2393 | * |
2394 | * @param t Tunnel this is about. | 2394 | * @param t Tunnel this is about. |
2395 | * @param fwd Is for FWD traffic? (ACK dest->owner) | 2395 | * @param fwd Is for FWD traffic? (ACK dest->owner) |
2396 | */ | 2396 | */ |
@@ -2447,7 +2447,7 @@ tunnel_send_data_ack (struct MeshTunnel *t, int fwd) | |||
2447 | * If buffering is on, send when sent to children and buffer space is free. | 2447 | * If buffering is on, send when sent to children and buffer space is free. |
2448 | * Note that although the name is fwd_ack, the FWD mean forward *traffic*, | 2448 | * Note that although the name is fwd_ack, the FWD mean forward *traffic*, |
2449 | * the ACK itself goes "back" (towards root). | 2449 | * the ACK itself goes "back" (towards root). |
2450 | * | 2450 | * |
2451 | * @param t Tunnel on which to send the ACK. | 2451 | * @param t Tunnel on which to send the ACK. |
2452 | * @param type Type of message that triggered the ACK transmission. | 2452 | * @param type Type of message that triggered the ACK transmission. |
2453 | * @param fwd Is this FWD ACK? (Going dest->owner) | 2453 | * @param fwd Is this FWD ACK? (Going dest->owner) |
@@ -2518,7 +2518,7 @@ tunnel_send_ack (struct MeshTunnel *t, uint16_t type, int fwd) | |||
2518 | delta_mid = rel->mid_sent - rel->head_sent->mid; | 2518 | delta_mid = rel->mid_sent - rel->head_sent->mid; |
2519 | else | 2519 | else |
2520 | delta_mid = 0; | 2520 | delta_mid = 0; |
2521 | if (0 > delta || (GNUNET_YES == t->reliable && | 2521 | if (0 > delta || (GNUNET_YES == t->reliable && |
2522 | NULL != o && | 2522 | NULL != o && |
2523 | (10 < rel->n_sent || 64 <= delta_mid))) | 2523 | (10 < rel->n_sent || 64 <= delta_mid))) |
2524 | delta = 0; | 2524 | delta = 0; |
@@ -2549,7 +2549,7 @@ tunnel_send_ack (struct MeshTunnel *t, uint16_t type, int fwd) | |||
2549 | 2549 | ||
2550 | /** | 2550 | /** |
2551 | * Modify the mesh message TID from global to local and send to client. | 2551 | * Modify the mesh message TID from global to local and send to client. |
2552 | * | 2552 | * |
2553 | * @param t Tunnel on which to send the message. | 2553 | * @param t Tunnel on which to send the message. |
2554 | * @param msg Message to modify and send. | 2554 | * @param msg Message to modify and send. |
2555 | * @param c Client to send to. | 2555 | * @param c Client to send to. |
@@ -2585,7 +2585,7 @@ tunnel_send_client_to_tid (struct MeshTunnel *t, | |||
2585 | 2585 | ||
2586 | /** | 2586 | /** |
2587 | * Modify the unicast message TID from global to local and send to client. | 2587 | * Modify the unicast message TID from global to local and send to client. |
2588 | * | 2588 | * |
2589 | * @param t Tunnel on which to send the message. | 2589 | * @param t Tunnel on which to send the message. |
2590 | * @param msg Message to modify and send. | 2590 | * @param msg Message to modify and send. |
2591 | * @param fwd Forward? | 2591 | * @param fwd Forward? |
@@ -2604,7 +2604,7 @@ tunnel_send_client_data (struct MeshTunnel *t, | |||
2604 | 2604 | ||
2605 | /** | 2605 | /** |
2606 | * Send up to 64 buffered messages to the client for in order delivery. | 2606 | * Send up to 64 buffered messages to the client for in order delivery. |
2607 | * | 2607 | * |
2608 | * @param t Tunnel on which to empty the message buffer. | 2608 | * @param t Tunnel on which to empty the message buffer. |
2609 | * @param c Client to send to. | 2609 | * @param c Client to send to. |
2610 | * @param rel Reliability structure to corresponding peer. | 2610 | * @param rel Reliability structure to corresponding peer. |
@@ -2650,7 +2650,7 @@ tunnel_send_client_buffered_data (struct MeshTunnel *t, struct MeshClient *c, | |||
2650 | /** | 2650 | /** |
2651 | * We have received a message out of order, buffer it until we receive | 2651 | * We have received a message out of order, buffer it until we receive |
2652 | * the missing one and we can feed the rest to the client. | 2652 | * the missing one and we can feed the rest to the client. |
2653 | * | 2653 | * |
2654 | * @param t Tunnel to add to. | 2654 | * @param t Tunnel to add to. |
2655 | * @param msg Message to buffer. | 2655 | * @param msg Message to buffer. |
2656 | * @param rel Reliability data to the corresponding direction. | 2656 | * @param rel Reliability data to the corresponding direction. |
@@ -2697,7 +2697,7 @@ tunnel_add_buffered_data (struct MeshTunnel *t, | |||
2697 | * Destroy a reliable message after it has been acknowledged, either by | 2697 | * Destroy a reliable message after it has been acknowledged, either by |
2698 | * direct mid ACK or bitfield. Updates the appropriate data structures and | 2698 | * direct mid ACK or bitfield. Updates the appropriate data structures and |
2699 | * timers and frees all memory. | 2699 | * timers and frees all memory. |
2700 | * | 2700 | * |
2701 | * @param copy Message that is no longer needed: remote peer got it. | 2701 | * @param copy Message that is no longer needed: remote peer got it. |
2702 | */ | 2702 | */ |
2703 | static void | 2703 | static void |
@@ -3111,7 +3111,7 @@ tunnel_destroy (struct MeshTunnel *t) | |||
3111 | GNUNET_break (0); | 3111 | GNUNET_break (0); |
3112 | r = GNUNET_SYSERR; | 3112 | r = GNUNET_SYSERR; |
3113 | } | 3113 | } |
3114 | if (GNUNET_YES != | 3114 | if (GNUNET_YES != |
3115 | GNUNET_CONTAINER_multihashmap32_remove (incoming_tunnels, | 3115 | GNUNET_CONTAINER_multihashmap32_remove (incoming_tunnels, |
3116 | t->local_tid_dest, t)) | 3116 | t->local_tid_dest, t)) |
3117 | { | 3117 | { |
@@ -3163,10 +3163,10 @@ tunnel_destroy (struct MeshTunnel *t) | |||
3163 | 3163 | ||
3164 | /** | 3164 | /** |
3165 | * Tunnel is empty: destroy it. | 3165 | * Tunnel is empty: destroy it. |
3166 | * | 3166 | * |
3167 | * Notifies all participants (peers, cleints) about the destruction. | 3167 | * Notifies all participants (peers, cleints) about the destruction. |
3168 | * | 3168 | * |
3169 | * @param t Tunnel to destroy. | 3169 | * @param t Tunnel to destroy. |
3170 | */ | 3170 | */ |
3171 | static void | 3171 | static void |
3172 | tunnel_destroy_empty (struct MeshTunnel *t) | 3172 | tunnel_destroy_empty (struct MeshTunnel *t) |
@@ -3192,7 +3192,7 @@ tunnel_destroy_empty (struct MeshTunnel *t) | |||
3192 | 3192 | ||
3193 | /** | 3193 | /** |
3194 | * Initialize a Flow Control structure to the initial state. | 3194 | * Initialize a Flow Control structure to the initial state. |
3195 | * | 3195 | * |
3196 | * @param fc Flow Control structure to initialize. | 3196 | * @param fc Flow Control structure to initialize. |
3197 | */ | 3197 | */ |
3198 | static void | 3198 | static void |
@@ -3209,12 +3209,12 @@ fc_init (struct MeshFlowControl *fc) | |||
3209 | 3209 | ||
3210 | /** | 3210 | /** |
3211 | * Create a new tunnel | 3211 | * Create a new tunnel |
3212 | * | 3212 | * |
3213 | * @param owner Who is the owner of the tunnel (short ID). | 3213 | * @param owner Who is the owner of the tunnel (short ID). |
3214 | * @param tid Tunnel Number of the tunnel. | 3214 | * @param tid Tunnel Number of the tunnel. |
3215 | * @param client Clients that owns the tunnel, NULL for foreign tunnels. | 3215 | * @param client Clients that owns the tunnel, NULL for foreign tunnels. |
3216 | * @param local Tunnel Number for the tunnel, for the client point of view. | 3216 | * @param local Tunnel Number for the tunnel, for the client point of view. |
3217 | * | 3217 | * |
3218 | * @return A new initialized tunnel. NULL on error. | 3218 | * @return A new initialized tunnel. NULL on error. |
3219 | */ | 3219 | */ |
3220 | static struct MeshTunnel * | 3220 | static struct MeshTunnel * |
@@ -3277,7 +3277,7 @@ tunnel_new (GNUNET_PEER_Id owner, | |||
3277 | 3277 | ||
3278 | /** | 3278 | /** |
3279 | * Set options in a tunnel, extracted from a bit flag field | 3279 | * Set options in a tunnel, extracted from a bit flag field |
3280 | * | 3280 | * |
3281 | * @param t Tunnel to set options to. | 3281 | * @param t Tunnel to set options to. |
3282 | * @param options Bit array in host byte order. | 3282 | * @param options Bit array in host byte order. |
3283 | */ | 3283 | */ |
@@ -3789,12 +3789,12 @@ queue_send (void *cls, size_t size, void *buf) | |||
3789 | 3789 | ||
3790 | /** | 3790 | /** |
3791 | * @brief Queue and pass message to core when possible. | 3791 | * @brief Queue and pass message to core when possible. |
3792 | * | 3792 | * |
3793 | * If type is payload (UNICAST, TO_ORIGIN) checks for queue status and | 3793 | * If type is payload (UNICAST, TO_ORIGIN) checks for queue status and |
3794 | * accounts for it. In case the queue is full, the message is dropped and | 3794 | * accounts for it. In case the queue is full, the message is dropped and |
3795 | * a break issued. | 3795 | * a break issued. |
3796 | * | 3796 | * |
3797 | * Otherwise, message is treated as internal and allowed to go regardless of | 3797 | * Otherwise, message is treated as internal and allowed to go regardless of |
3798 | * queue status. | 3798 | * queue status. |
3799 | * | 3799 | * |
3800 | * @param cls Closure (@c type dependant). It will be used by queue_send to | 3800 | * @param cls Closure (@c type dependant). It will be used by queue_send to |
@@ -4065,7 +4065,7 @@ handle_mesh_path_create (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
4065 | /* Eliminate tunnel when origin dies */ | 4065 | /* Eliminate tunnel when origin dies */ |
4066 | tunnel_reset_timeout (t, GNUNET_YES); | 4066 | tunnel_reset_timeout (t, GNUNET_YES); |
4067 | /* Keep tunnel alive in direction dest->owner*/ | 4067 | /* Keep tunnel alive in direction dest->owner*/ |
4068 | tunnel_reset_timeout (t, GNUNET_NO); | 4068 | tunnel_reset_timeout (t, GNUNET_NO); |
4069 | } | 4069 | } |
4070 | else | 4070 | else |
4071 | { | 4071 | { |
@@ -4753,7 +4753,7 @@ handle_mesh_keepalive (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
4753 | return GNUNET_OK; | 4753 | return GNUNET_OK; |
4754 | } | 4754 | } |
4755 | 4755 | ||
4756 | fwd = GNUNET_MESSAGE_TYPE_MESH_FWD_KEEPALIVE == ntohs (message->type) ? | 4756 | fwd = GNUNET_MESSAGE_TYPE_MESH_FWD_KEEPALIVE == ntohs (message->type) ? |
4757 | GNUNET_YES : GNUNET_NO; | 4757 | GNUNET_YES : GNUNET_NO; |
4758 | c = fwd ? t->client : t->owner; | 4758 | c = fwd ? t->client : t->owner; |
4759 | hop = fwd ? t->next_hop : t->prev_hop; | 4759 | hop = fwd ? t->next_hop : t->prev_hop; |
@@ -4845,7 +4845,7 @@ dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp, | |||
4845 | GNUNET_PEER_resolve (peer->tunnels[i]->id.oid, &id); | 4845 | GNUNET_PEER_resolve (peer->tunnels[i]->id.oid, &id); |
4846 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " ... tunnel %s:%X (%X / %X)\n", | 4846 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " ... tunnel %s:%X (%X / %X)\n", |
4847 | GNUNET_i2s (&id), peer->tunnels[i]->id.tid, | 4847 | GNUNET_i2s (&id), peer->tunnels[i]->id.tid, |
4848 | peer->tunnels[i]->local_tid, | 4848 | peer->tunnels[i]->local_tid, |
4849 | peer->tunnels[i]->local_tid_dest); | 4849 | peer->tunnels[i]->local_tid_dest); |
4850 | if (peer->tunnels[i]->state == MESH_TUNNEL_SEARCHING) | 4850 | if (peer->tunnels[i]->state == MESH_TUNNEL_SEARCHING) |
4851 | { | 4851 | { |
@@ -5152,7 +5152,7 @@ handle_local_tunnel_destroy (void *cls, struct GNUNET_SERVER_Client *client, | |||
5152 | peer_remove_tunnel (peer_get_short (t->dest), t); | 5152 | peer_remove_tunnel (peer_get_short (t->dest), t); |
5153 | t->owner = NULL; | 5153 | t->owner = NULL; |
5154 | } | 5154 | } |
5155 | else | 5155 | else |
5156 | { | 5156 | { |
5157 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 5157 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
5158 | " tunnel %X client %p (%p, %p)\n", | 5158 | " tunnel %X client %p (%p, %p)\n", |
@@ -5225,7 +5225,7 @@ handle_local_data (void *cls, struct GNUNET_SERVER_Client *client, | |||
5225 | t->owner->handle == client) | 5225 | t->owner->handle == client) |
5226 | || | 5226 | || |
5227 | (tid >= GNUNET_MESH_LOCAL_TUNNEL_ID_SERV && | 5227 | (tid >= GNUNET_MESH_LOCAL_TUNNEL_ID_SERV && |
5228 | t->client && | 5228 | t->client && |
5229 | t->client->handle == client) ) ) | 5229 | t->client->handle == client) ) ) |
5230 | { | 5230 | { |
5231 | GNUNET_break (0); | 5231 | GNUNET_break (0); |
@@ -5621,7 +5621,7 @@ server_init (void) | |||
5621 | * @param identity the public identity of this peer | 5621 | * @param identity the public identity of this peer |
5622 | */ | 5622 | */ |
5623 | static void | 5623 | static void |
5624 | core_init (void *cls, | 5624 | core_init (void *cls, |
5625 | const struct GNUNET_PeerIdentity *identity) | 5625 | const struct GNUNET_PeerIdentity *identity) |
5626 | { | 5626 | { |
5627 | const struct GNUNET_CONFIGURATION_Handle *c = cls; | 5627 | const struct GNUNET_CONFIGURATION_Handle *c = cls; |
@@ -5901,7 +5901,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server, | |||
5901 | GNUNET_free (keyfile); | 5901 | GNUNET_free (keyfile); |
5902 | GNUNET_assert (NULL != pk); | 5902 | GNUNET_assert (NULL != pk); |
5903 | my_private_key = pk; | 5903 | my_private_key = pk; |
5904 | GNUNET_CRYPTO_ecc_key_get_public_for_signature (my_private_key, | 5904 | GNUNET_CRYPTO_ecc_key_get_public_for_signature (my_private_key, |
5905 | &my_full_id.public_key); | 5905 | &my_full_id.public_key); |
5906 | myid = GNUNET_PEER_intern (&my_full_id); | 5906 | myid = GNUNET_PEER_intern (&my_full_id); |
5907 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 5907 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |