diff options
Diffstat (limited to 'testing/DHT_cryptosendfiletest.c')
-rw-r--r-- | testing/DHT_cryptosendfiletest.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/testing/DHT_cryptosendfiletest.c b/testing/DHT_cryptosendfiletest.c index 84d777cc..09683a45 100644 --- a/testing/DHT_cryptosendfiletest.c +++ b/testing/DHT_cryptosendfiletest.c | |||
@@ -90,7 +90,7 @@ int main(int argc, char *argv[]) | |||
90 | //memcpy(self_client_id, "qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq", 32); | 90 | //memcpy(self_client_id, "qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq", 32); |
91 | 91 | ||
92 | 92 | ||
93 | addfriend(friend_id); | 93 | DHT_addfriend(friend_id); |
94 | IP_Port friend_ip; | 94 | IP_Port friend_ip; |
95 | int connection = -1; | 95 | int connection = -1; |
96 | int inconnection = -1; | 96 | int inconnection = -1; |
@@ -112,7 +112,7 @@ int main(int argc, char *argv[]) | |||
112 | IP_Port bootstrap_ip_port; | 112 | IP_Port bootstrap_ip_port; |
113 | bootstrap_ip_port.port = htons(atoi(argv[2])); | 113 | bootstrap_ip_port.port = htons(atoi(argv[2])); |
114 | bootstrap_ip_port.ip.i = inet_addr(argv[1]); | 114 | bootstrap_ip_port.ip.i = inet_addr(argv[1]); |
115 | bootstrap(bootstrap_ip_port); | 115 | DHT_bootstrap(bootstrap_ip_port); |
116 | 116 | ||
117 | IP_Port ip_port; | 117 | IP_Port ip_port; |
118 | uint8_t data[MAX_UDP_PACKET_SIZE]; | 118 | uint8_t data[MAX_UDP_PACKET_SIZE]; |
@@ -146,21 +146,21 @@ int main(int argc, char *argv[]) | |||
146 | } | 146 | } |
147 | } | 147 | } |
148 | } | 148 | } |
149 | friend_ip = getfriendip((uint8_t *)friend_id); | 149 | friend_ip = DHT_getfriendip(friend_id); |
150 | if(friend_ip.ip.i != 0) | 150 | if(friend_ip.ip.i != 0) |
151 | { | 151 | { |
152 | if(connection == -1 && friendrequest == -1) | 152 | if(connection == -1 && friendrequest == -1) |
153 | { | 153 | { |
154 | printf("Sending friend request to peer:"); | 154 | printf("Sending friend request to peer:"); |
155 | printip(friend_ip); | 155 | printip(friend_ip); |
156 | friendrequest = send_friendrequest(friend_id, friend_ip, "Hello World", 12); | 156 | friendrequest = send_friendrequest(friend_id, friend_ip,(uint8_t *) "Hello World", 12); |
157 | //connection = crypto_connect((uint8_t *)friend_id, friend_ip); | 157 | //connection = crypto_connect((uint8_t *)friend_id, friend_ip); |
158 | //connection = new_connection(friend_ip); | 158 | //connection = new_connection(friend_ip); |
159 | } | 159 | } |
160 | if(check_friendrequest(friendrequest) == 1) | 160 | if(check_friendrequest(friendrequest) == 1) |
161 | { | 161 | { |
162 | printf("Started connecting to friend:"); | 162 | printf("Started connecting to friend:"); |
163 | connection = crypto_connect((uint8_t *)friend_id, friend_ip); | 163 | connection = crypto_connect(friend_id, friend_ip); |
164 | } | 164 | } |
165 | } | 165 | } |
166 | if(inconnection == -1) | 166 | if(inconnection == -1) |