Bladeren bron

* Don't bother with hostprotocol() in share/update, only using AF_INET anyway

svn: 1442
Bryan Drewery 21 jaren geleden
bovenliggende
commit
3a167e91c4
2 gewijzigde bestanden met toevoegingen van 5 en 3 verwijderingen
  1. 3 2
      src/mod/share.mod/share.c
  2. 2 1
      src/mod/update.mod/update.c

+ 3 - 2
src/mod/share.mod/share.c

@@ -1036,7 +1036,7 @@ share_userfileq(int idx, char *par)
 static void
 share_ufsend(int idx, char *par)
 {
-  char *ip = NULL, *port = NULL;
+  char *port = NULL, *ip = NULL;
   char s[1024] = "";
   int i, sock;
   FILE *f = NULL;
@@ -1057,7 +1057,8 @@ share_ufsend(int idx, char *par)
     ip = newsplit(&par);
     port = newsplit(&par);
 #ifdef USE_IPV6
-    sock = getsock(SOCK_BINARY, hostprotocol(ip));      /* Don't buffer this -> mark binary. */
+//    sock = getsock(SOCK_BINARY, hostprotocol(ip));      /* Don't buffer this -> mark binary. */
+    sock = getsock(SOCK_BINARY, AF_INET);
 #else
     sock = getsock(SOCK_BINARY);        /* Don't buffer this -> mark binary. */
 #endif /* USE_IPV6 */

+ 2 - 1
src/mod/update.mod/update.c

@@ -105,7 +105,8 @@ static void update_ufsend(int idx, char *par)
     ip = newsplit(&par);
     port = newsplit(&par);
 #ifdef USE_IPV6
-    sock = getsock(SOCK_BINARY, hostprotocol(ip)); /* Don't buffer this -> mark binary. */
+//    sock = getsock(SOCK_BINARY, hostprotocol(ip)); /* Don't buffer this -> mark binary. */
+    sock = getsock(SOCK_BINARY, AF_INET);
 #else
     sock = getsock(SOCK_BINARY); /* Don't buffer this -> mark binary. */
 #endif /* USE_IPV6 */