diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-09-22 15:38:47 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-09-22 15:38:47 +0000 |
commit | 0d8788deb35bfe9e2a16d94ca015af05d077cba7 (patch) | |
tree | 439f641d7484607b2c4dac5e4632d91ebb1daf4f /src/pt | |
parent | 69cf9d7768b72fd21a9aa2ba9e208dba193a21a1 (diff) | |
download | gnunet-0d8788deb35bfe9e2a16d94ca015af05d077cba7.tar.gz gnunet-0d8788deb35bfe9e2a16d94ca015af05d077cba7.zip |
-minor code cleanup
Diffstat (limited to 'src/pt')
-rw-r--r-- | src/pt/gnunet-daemon-pt.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/pt/gnunet-daemon-pt.c b/src/pt/gnunet-daemon-pt.c index 19e1629cf..326233633 100644 --- a/src/pt/gnunet-daemon-pt.c +++ b/src/pt/gnunet-daemon-pt.c | |||
@@ -35,15 +35,12 @@ | |||
35 | #include "gnunet_applications.h" | 35 | #include "gnunet_applications.h" |
36 | #include "block_dns.h" | 36 | #include "block_dns.h" |
37 | 37 | ||
38 | #define PORT_PT 4242 // FIXME | ||
39 | |||
40 | 38 | ||
41 | /** | 39 | /** |
42 | * After how long do we time out if we could not get an IP from VPN or MESH? | 40 | * After how long do we time out if we could not get an IP from VPN or MESH? |
43 | */ | 41 | */ |
44 | #define TIMEOUT GNUNET_TIME_UNIT_MINUTES | 42 | #define TIMEOUT GNUNET_TIME_UNIT_MINUTES |
45 | 43 | ||
46 | |||
47 | /** | 44 | /** |
48 | * How many bytes of payload do we allow at most for a DNS reply? | 45 | * How many bytes of payload do we allow at most for a DNS reply? |
49 | * Given that this is pretty much limited to loopback, we can be | 46 | * Given that this is pretty much limited to loopback, we can be |
@@ -312,7 +309,7 @@ submit_request (struct ReplyContext *rc); | |||
312 | * record and then continue with 'submit_request' to look at | 309 | * record and then continue with 'submit_request' to look at |
313 | * the other records. | 310 | * the other records. |
314 | * | 311 | * |
315 | * @param cls our 'struct ReplyContext' | 312 | * @param cls our `struct ReplyContext` |
316 | * @param af address family, AF_INET or AF_INET6; AF_UNSPEC on error; | 313 | * @param af address family, AF_INET or AF_INET6; AF_UNSPEC on error; |
317 | * will match 'result_af' from the request | 314 | * will match 'result_af' from the request |
318 | * @param address IP address (struct in_addr or struct in_addr6, depending on 'af') | 315 | * @param address IP address (struct in_addr or struct in_addr6, depending on 'af') |
@@ -463,8 +460,8 @@ submit_request (struct ReplyContext *rc) | |||
463 | * Test if any of the given records need protocol-translation work. | 460 | * Test if any of the given records need protocol-translation work. |
464 | * | 461 | * |
465 | * @param ra array of records | 462 | * @param ra array of records |
466 | * @param ra_len number of entries in ra | 463 | * @param ra_len number of entries in @a ra |
467 | * @return GNUNET_YES if any of the given records require protocol-translation | 464 | * @return #GNUNET_YES if any of the given records require protocol-translation |
468 | */ | 465 | */ |
469 | static int | 466 | static int |
470 | work_test (const struct GNUNET_DNSPARSER_Record *ra, | 467 | work_test (const struct GNUNET_DNSPARSER_Record *ra, |
@@ -696,11 +693,10 @@ dns_pre_request_handler (void *cls, | |||
696 | * | 693 | * |
697 | * @param cls closure, NULL | 694 | * @param cls closure, NULL |
698 | * @param tunnel connection to the other end | 695 | * @param tunnel connection to the other end |
699 | * @param tunnel_ctx pointer to our 'struct TunnelState *' | 696 | * @param tunnel_ctx FIXME |
700 | * @param message the actual message | 697 | * @param message the actual message |
701 | * | 698 | * @return #GNUNET_OK to keep the connection open, |
702 | * @return GNUNET_OK to keep the connection open, | 699 | * #GNUNET_SYSERR to close it (signal serious error) |
703 | * GNUNET_SYSERR to close it (signal serious error) | ||
704 | */ | 700 | */ |
705 | static int | 701 | static int |
706 | receive_dns_response (void *cls GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel, | 702 | receive_dns_response (void *cls GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel, |
@@ -910,7 +906,7 @@ handle_dht_result (void *cls, | |||
910 | mesh_tunnel = GNUNET_MESH_tunnel_create (mesh_handle, | 906 | mesh_tunnel = GNUNET_MESH_tunnel_create (mesh_handle, |
911 | NULL /* FIXME: tunnel ctx */, | 907 | NULL /* FIXME: tunnel ctx */, |
912 | &pid, | 908 | &pid, |
913 | PORT_PT, /* FIXME: DNS port, right? */ | 909 | GNUNET_APPLICATION_TYPE_INTERNET_RESOLVER, |
914 | GNUNET_YES /* no buffer */, | 910 | GNUNET_YES /* no buffer */, |
915 | GNUNET_NO /* reliable */); | 911 | GNUNET_NO /* reliable */); |
916 | 912 | ||