aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2012-10-19 10:35:15 +0000
committerBart Polot <bart@net.in.tum.de>2012-10-19 10:35:15 +0000
commitd653fb3e7b0f565df057fcde14a9d002c485abee (patch)
tree6ce1624d768a0c93241ec032cf047b64c4527258 /src
parent6e749477bee9342ce08a672bbc7b56dfa3501891 (diff)
downloadgnunet-d653fb3e7b0f565df057fcde14a9d002c485abee.tar.gz
gnunet-d653fb3e7b0f565df057fcde14a9d002c485abee.zip
- debug, style
Diffstat (limited to 'src')
-rw-r--r--src/mesh/gnunet-service-mesh.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c
index 057fdc842..8db18caf6 100644
--- a/src/mesh/gnunet-service-mesh.c
+++ b/src/mesh/gnunet-service-mesh.c
@@ -1584,11 +1584,11 @@ regex_put (const char *regex)
1584{ 1584{
1585 struct GNUNET_REGEX_Automaton *dfa; 1585 struct GNUNET_REGEX_Automaton *dfa;
1586 1586
1587 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "regex_put (%s) start\n", regex); 1587 DEBUG_DHT (" regex_put (%s) start\n", regex);
1588 dfa = GNUNET_REGEX_construct_dfa (regex, strlen(regex)); 1588 dfa = GNUNET_REGEX_construct_dfa (regex, strlen(regex));
1589 GNUNET_REGEX_iterate_all_edges (dfa, &regex_iterator, NULL); 1589 GNUNET_REGEX_iterate_all_edges (dfa, &regex_iterator, NULL);
1590 GNUNET_REGEX_automaton_destroy (dfa); 1590 GNUNET_REGEX_automaton_destroy (dfa);
1591 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "regex_put (%s) end\n", regex); 1591 DEBUG_DHT (" regex_put (%s) end\n", regex);
1592 1592
1593} 1593}
1594 1594
@@ -1769,9 +1769,9 @@ announce_regex (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
1769 struct MeshClient *c = cls; 1769 struct MeshClient *c = cls;
1770 unsigned int i; 1770 unsigned int i;
1771 1771
1772 c->regex_announce_task = GNUNET_SCHEDULER_NO_TASK;
1772 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) 1773 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
1773 { 1774 {
1774 c->regex_announce_task = GNUNET_SCHEDULER_NO_TASK;
1775 return; 1775 return;
1776 } 1776 }
1777 1777
@@ -1781,8 +1781,9 @@ announce_regex (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
1781 { 1781 {
1782 regex_put (c->regexes[i]); 1782 regex_put (c->regexes[i]);
1783 } 1783 }
1784 c->regex_announce_task = 1784 c->regex_announce_task = GNUNET_SCHEDULER_add_delayed (app_announce_time,
1785 GNUNET_SCHEDULER_add_delayed (app_announce_time, &announce_regex, cls); 1785 &announce_regex,
1786 cls);
1786 DEBUG_DHT ("Finished PUT for regex\n"); 1787 DEBUG_DHT ("Finished PUT for regex\n");
1787 1788
1788 return; 1789 return;
@@ -4710,10 +4711,13 @@ queue_destroy (struct MeshPeerQueue *queue, int clear_cls)
4710 { 4711 {
4711 case GNUNET_MESSAGE_TYPE_MESH_TUNNEL_DESTROY: 4712 case GNUNET_MESSAGE_TYPE_MESH_TUNNEL_DESTROY:
4712 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, " cancelling TUNNEL_DESTROY\n"); 4713 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, " cancelling TUNNEL_DESTROY\n");
4714 GNUNET_assert (GNUNET_YES == queue->tunnel->destroy);
4715 /* FIXME: don't cancel, send and destroy tunnel in queue_send */
4713 /* fall through */ 4716 /* fall through */
4714 case GNUNET_MESSAGE_TYPE_MESH_UNICAST: 4717 case GNUNET_MESSAGE_TYPE_MESH_UNICAST:
4715 case GNUNET_MESSAGE_TYPE_MESH_MULTICAST: 4718 case GNUNET_MESSAGE_TYPE_MESH_MULTICAST:
4716 case GNUNET_MESSAGE_TYPE_MESH_TO_ORIGIN: 4719 case GNUNET_MESSAGE_TYPE_MESH_TO_ORIGIN:
4720 case GNUNET_MESSAGE_TYPE_MESH_ACK:
4717 case GNUNET_MESSAGE_TYPE_MESH_PATH_KEEPALIVE: 4721 case GNUNET_MESSAGE_TYPE_MESH_PATH_KEEPALIVE:
4718 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 4722 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
4719 " prebuilt message\n"); 4723 " prebuilt message\n");
@@ -5895,6 +5899,7 @@ handle_mesh_ack (void *cls, const struct GNUNET_PeerIdentity *peer,
5895 return GNUNET_OK; 5899 return GNUNET_OK;
5896 } 5900 }
5897 ack = ntohl (msg->pid); 5901 ack = ntohl (msg->pid);
5902 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " ACK %u\n", ack);
5898 5903
5899 /* Is this a forward or backward ACK? */ 5904 /* Is this a forward or backward ACK? */
5900 if (tree_get_predecessor(t->tree) != GNUNET_PEER_search(peer)) 5905 if (tree_get_predecessor(t->tree) != GNUNET_PEER_search(peer))
@@ -8256,6 +8261,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
8256 GNUNET_SCHEDULER_shutdown (); 8261 GNUNET_SCHEDULER_shutdown ();
8257 return; 8262 return;
8258 } 8263 }
8264 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "APP_ANNOUNCE_TIME %llu ms\n", app_announce_time.rel_value);
8259 8265
8260 if (GNUNET_OK != 8266 if (GNUNET_OK !=
8261 GNUNET_CONFIGURATION_get_value_time (c, "MESH", "ID_ANNOUNCE_TIME", 8267 GNUNET_CONFIGURATION_get_value_time (c, "MESH", "ID_ANNOUNCE_TIME",