gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r582 - GNUnet/src/applications/bootstrap_http


From: durner
Subject: [GNUnet-SVN] r582 - GNUnet/src/applications/bootstrap_http
Date: Sun, 3 Apr 2005 12:58:46 -0700 (PDT)

Author: durner
Date: 2005-04-03 12:58:30 -0700 (Sun, 03 Apr 2005)
New Revision: 582

Modified:
   GNUnet/src/applications/bootstrap_http/http.c
Log:
check specified port

Modified: GNUnet/src/applications/bootstrap_http/http.c
===================================================================
--- GNUnet/src/applications/bootstrap_http/http.c       2005-04-03 12:05:55 UTC 
(rev 581)
+++ GNUnet/src/applications/bootstrap_http/http.c       2005-04-03 19:58:30 UTC 
(rev 582)
@@ -90,8 +90,15 @@
     curpos++;
   if (curpos == lenHostname)
     port = TCP_HTTP_PORT;
-  else
+  else {
     port = atoi(hostname + curpos + 1);
+    if (!port) {
+       LOG(LOG_WARNING,
+               _("Invalid port \"%s\" in hostlist specification, trying port 
%d.\n"),
+               TCP_HTTP_PORT);
+       port = TCP_HTTP_PORT;
+    }
+  }
   
   hostname[curpos] = '\0'; /* terminator for hostname */
   





reply via email to

[Prev in Thread] Current Thread [Next in Thread]