aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_tcp.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2014-06-02 09:40:12 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2014-06-02 09:40:12 +0000
commit800c3b54ba9a67ad995d6b5c1ecbffe224f4676d (patch)
tree43347995315ca4cdd5b6d1a8dd2f0e7cf0a71134 /src/transport/plugin_transport_tcp.c
parentda3d84fb0f3e5a681976b53d43275b2d9b401886 (diff)
downloadgnunet-800c3b54ba9a67ad995d6b5c1ecbffe224f4676d.tar.gz
gnunet-800c3b54ba9a67ad995d6b5c1ecbffe224f4676d.zip
fix semantic for address_to_string
Diffstat (limited to 'src/transport/plugin_transport_tcp.c')
-rw-r--r--src/transport/plugin_transport_tcp.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c
index 50fe02f0a..eda6bd23e 100644
--- a/src/transport/plugin_transport_tcp.c
+++ b/src/transport/plugin_transport_tcp.c
@@ -1690,8 +1690,8 @@ append_port (void *cls, const char *hostname)
1690 1690
1691 if (NULL == hostname) 1691 if (NULL == hostname)
1692 { 1692 {
1693 ppc->asc (ppc->asc_cls, NULL ); 1693 ppc->asc (ppc->asc_cls, NULL, GNUNET_OK); /* Final call, done */
1694 GNUNET_CONTAINER_DLL_remove(ppc_dll_head, ppc_dll_tail, ppc); 1694 GNUNET_CONTAINER_DLL_remove (ppc_dll_head, ppc_dll_tail, ppc);
1695 GNUNET_SCHEDULER_cancel (ppc->timeout_task); 1695 GNUNET_SCHEDULER_cancel (ppc->timeout_task);
1696 ppc->timeout_task = GNUNET_SCHEDULER_NO_TASK; 1696 ppc->timeout_task = GNUNET_SCHEDULER_NO_TASK;
1697 ppc->resolver_handle = NULL; 1697 ppc->resolver_handle = NULL;
@@ -1703,6 +1703,7 @@ append_port (void *cls, const char *hostname)
1703 break; 1703 break;
1704 if (NULL == cur) 1704 if (NULL == cur)
1705 { 1705 {
1706 ppc->asc (ppc->asc_cls, NULL, GNUNET_SYSERR);
1706 GNUNET_break(0); 1707 GNUNET_break(0);
1707 return; 1708 return;
1708 } 1709 }
@@ -1713,7 +1714,7 @@ append_port (void *cls, const char *hostname)
1713 else 1714 else
1714 GNUNET_asprintf (&ret, "%s.%u.%s:%d", PLUGIN_NAME, ppc->options, hostname, 1715 GNUNET_asprintf (&ret, "%s.%u.%s:%d", PLUGIN_NAME, ppc->options, hostname,
1715 ppc->port); 1716 ppc->port);
1716 ppc->asc (ppc->asc_cls, ret); 1717 ppc->asc (ppc->asc_cls, ret, GNUNET_OK);
1717 GNUNET_free(ret); 1718 GNUNET_free(ret);
1718} 1719}
1719 1720
@@ -1730,6 +1731,7 @@ append_port (void *cls, const char *hostname)
1730 * @param timeout after how long should we give up? 1731 * @param timeout after how long should we give up?
1731 * @param asc function to call on each string 1732 * @param asc function to call on each string
1732 * @param asc_cls closure for asc 1733 * @param asc_cls closure for asc
1734 *
1733 */ 1735 */
1734static void 1736static void
1735tcp_plugin_address_pretty_printer (void *cls, const char *type, 1737tcp_plugin_address_pretty_printer (void *cls, const char *type,
@@ -1774,7 +1776,8 @@ tcp_plugin_address_pretty_printer (void *cls, const char *type,
1774 else 1776 else
1775 { 1777 {
1776 /* invalid address */ 1778 /* invalid address */
1777 asc (asc_cls, NULL ); 1779 asc (asc_cls, NULL, GNUNET_SYSERR);
1780 asc (asc_cls, NULL, GNUNET_OK);
1778 return; 1781 return;
1779 } 1782 }
1780 ppc = GNUNET_new (struct PrettyPrinterContext); 1783 ppc = GNUNET_new (struct PrettyPrinterContext);