aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2015-06-25 08:47:00 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2015-06-25 08:47:00 +0000
commit4047fdf6b0ab8b49b49b06df1ce54e085f660696 (patch)
tree80657806968352f70be9a7effe56b06b2be81963
parent86ba6d5b16f7741768e801ea11bbdc492a1ceeb6 (diff)
downloadgnunet-4047fdf6b0ab8b49b49b06df1ce54e085f660696.tar.gz
gnunet-4047fdf6b0ab8b49b49b06df1ce54e085f660696.zip
adding a first set of fixmes to stun code
-rw-r--r--src/nat/nat_stun.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/nat/nat_stun.c b/src/nat/nat_stun.c
index 490a11257..085683c47 100644
--- a/src/nat/nat_stun.c
+++ b/src/nat/nat_stun.c
@@ -427,12 +427,14 @@ stun_dns_callback (void *cls,
427 427
428 if(NULL == request) { 428 if(NULL == request) {
429 LOG (GNUNET_ERROR_TYPE_INFO, "Empty request\n"); 429 LOG (GNUNET_ERROR_TYPE_INFO, "Empty request\n");
430 /* FIXME clean up ? */
430 return; 431 return;
431 } 432 }
432 433
433 if (NULL == addr) { 434 if (NULL == addr) {
434 request->dns_active = NULL; 435 request->dns_active = NULL;
435 LOG (GNUNET_ERROR_TYPE_INFO, "Error resolving host %s\n", request->stun_server); 436 LOG (GNUNET_ERROR_TYPE_INFO, "Error resolving host %s\n", request->stun_server);
437 /* FIXME clean up? */
436 return; 438 return;
437 } 439 }
438 440
@@ -487,6 +489,7 @@ GNUNET_NAT_stun_make_request(char * server, int port, struct GNUNET_NETWORK_Hand
487 strcpy (server_copy, server); 489 strcpy (server_copy, server);
488 }else{ 490 }else{
489 GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "Failed to allocate string"); 491 GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "Failed to allocate string");
492 /* FIXME: cleanup rh? */
490 return NULL; 493 return NULL;
491 } 494 }
492 495
@@ -495,7 +498,7 @@ GNUNET_NAT_stun_make_request(char * server, int port, struct GNUNET_NETWORK_Hand
495 rh->dns_active = GNUNET_RESOLVER_ip_get (rh->stun_server, AF_INET, 498 rh->dns_active = GNUNET_RESOLVER_ip_get (rh->stun_server, AF_INET,
496 GNUNET_CONNECTION_CONNECT_RETRY_TIMEOUT, 499 GNUNET_CONNECTION_CONNECT_RETRY_TIMEOUT,
497 &stun_dns_callback, rh); 500 &stun_dns_callback, rh);
498 501 /* FIXME: error handling NULL==dns_active, callback function? */
499 502
500 return rh; 503 return rh;
501} \ No newline at end of file 504}