summaryrefslogtreecommitdiff
path: root/other
diff options
context:
space:
mode:
authorslvr <slvr@unsafeio.com>2013-08-10 00:30:18 +0100
committerslvr <slvr@unsafeio.com>2013-08-10 00:43:50 +0100
commit6052b1f119d2b1494a7f2691f4dfed235b560636 (patch)
treeb3f24c586180ba526baf33e3d3814d3c10b8821d /other
parent1ec95162a0b0c4f54bb97ca39684573e73beac87 (diff)
network_registerhandler
Diffstat (limited to 'other')
-rw-r--r--other/DHT_bootstrap.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/other/DHT_bootstrap.c b/other/DHT_bootstrap.c
index befe2225..4b0adeff 100644
--- a/other/DHT_bootstrap.c
+++ b/other/DHT_bootstrap.c
@@ -113,9 +113,8 @@ int main(int argc, char *argv[])
113 free(bootstrap_key); 113 free(bootstrap_key);
114 } 114 }
115 115
116 IP_Port ip_port; 116 DHT_init();
117 uint8_t data[MAX_UDP_PACKET_SIZE]; 117 friendreq_init();
118 uint32_t length;
119 118
120 int is_waiting_for_dht_connection = 1; 119 int is_waiting_for_dht_connection = 1;
121 while(1) 120 while(1)
@@ -127,11 +126,8 @@ int main(int argc, char *argv[])
127 } 126 }
128 doDHT(); 127 doDHT();
129 128
130 while(receivepacket(&ip_port, data, &length) != -1) 129 networking_poll();
131 { 130
132 DHT_handlepacket(data, length, ip_port);
133 friendreq_handlepacket(data, length, ip_port);
134 }
135 c_sleep(1); 131 c_sleep(1);
136 } 132 }
137 shutdown_networking(); 133 shutdown_networking();