소스 검색

* Ported [2465] to 1.2.9

svn: 2606
Bryan Drewery 20 년 전
부모
커밋
6ac10b9bf6
3개의 변경된 파일9개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 0
      doc/UPDATES
  2. 2 2
      src/botnet.c
  3. 5 1
      src/net.c

+ 2 - 0
doc/UPDATES

@@ -32,6 +32,8 @@ Lines prefixed with '-' were disabled before release and are not finished, or ar
 * Fixed "un-allocated socket" errors when a relay fails.
 * Fixed var 'server-port' not being used correctly. (Now lists/saves/loads before servers)
 * Fixed a typo in msg_pass.
+* Failed relay no longer says failed link.
+* Fixed a socket protocol error.
 
 1.2.8
 * Fixed [bot]* cmds depending on case of botnicks.

+ 2 - 2
src/botnet.c

@@ -1088,7 +1088,7 @@ static void failed_tandem_relay(int idx)
   if (dcc[idx].port >= dcc[idx].u.relay->port + 3) {
     struct chat_info *ci = dcc[uidx].u.relay->chat;
 
-    dprintf(uidx, "Could not link to %s.\n", dcc[idx].nick);
+    dprintf(uidx, "Could not relay to %s.\n", dcc[idx].nick);
     dcc[uidx].status = dcc[uidx].u.relay->old_status;
     free(dcc[uidx].u.relay);
     dcc[uidx].u.chat = ci;
@@ -1201,7 +1201,7 @@ static void tandem_relay_dns_callback(int id, void *client_data, const char *hos
   if (!ips) {
     struct chat_info *ci = dcc[idx].u.relay->chat;
 
-    dprintf(idx, "Could not link to %s.\n", dcc[i].nick);
+    dprintf(idx, "Could not relay to %s.\n", dcc[i].nick);
     dcc[idx].status = dcc[idx].u.relay->old_status;
     free(dcc[idx].u.relay);
     dcc[idx].u.chat = ci;

+ 5 - 1
src/net.c

@@ -444,7 +444,11 @@ int real_getsock(int options, char *fname, int line)
 {
   int af_def = AF_INET;
 #endif /* USE_IPV6 */
-  int sock = socket(af_def, SOCK_STREAM, 0);
+  int sock = -1;
+
+  if (!af_def) 
+    af_def = AF_INET;
+  sock = socket(af_def, SOCK_STREAM, 0);
 
   if (sock >= 0)
     setsock(sock, options);