Vanilla Development Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CVS update: Vanilla/ntserv



Date:	Tuesday February 29, 2000 @ 21:38
Author:	unbelver

Update of /home/netrek/cvsroot/Vanilla/ntserv
In directory swashbuckler.fortress.real-time.com:/var/tmp/cvs-serv5194

Modified Files:
	solicit.c 
Log Message:

After discussion in IRC, removing the fallback if this.host.name is
bad, or unbindable.  solicit for that entry will be disabled.

--Carlos V.



****************************************

Index: Vanilla/ntserv/solicit.c
diff -u Vanilla/ntserv/solicit.c:1.14 Vanilla/ntserv/solicit.c:1.15
--- Vanilla/ntserv/solicit.c:1.14	Tue Feb 29 20:49:40 2000
+++ Vanilla/ntserv/solicit.c	Tue Feb 29 21:38:25 2000
@@ -52,12 +52,11 @@
   /* numeric first */
   if( (m->address.sin_addr.s_addr = inet_addr(m->ours)) == -1 ) {
     struct hostent *hp;
-
     /* then name */
     if ((hp = gethostbyname(m->ours)) == NULL) {
-      /* bad hostname or unable to get ip address, use default interface */
-      m->address.sin_addr.s_addr = INADDR_ANY;
-      fprintf(stderr, "Bad this.host.name field in .metaservers. Using default interface.\n");
+      /* bad hostname or unable to get ip address */
+      fprintf(stderr, "Bad this.host.name field in .metaservers.\n");
+      return 0;
     } else {
       m->address.sin_addr.s_addr = *(long *) hp->h_addr;
     }
@@ -66,12 +65,8 @@
   m->address.sin_family      = AF_INET;
   m->address.sin_port        = 0;
   if (bind(m->sock,(struct sockaddr *)&m->address, sizeof(m->address)) < 0) {
-    perror("solicit: udp_attach: bind, trying default interface next");
-    m->address.sin_addr.s_addr = INADDR_ANY;
-    if (bind(m->sock,(struct sockaddr *)&m->address, sizeof(m->address)) < 0) {
-      perror("solicit: udp_attatch: bind, 2nd try failed");
-      return 0;
-    }
+    perror("solicit: udp_attach: unable to bind to desired interface (this.host.name field)");
+    return 0;
   }
   
   /* build the destination address */