Explorar o código

* Fixed relay segfault

svn: 1591
Bryan Drewery %!s(int64=21) %!d(string=hai) anos
pai
achega
bd202e1f7c
Modificáronse 2 ficheiros con 2 adicións e 1 borrados
  1. 1 0
      doc/UPDATES
  2. 1 1
      src/botnet.c

+ 1 - 0
doc/UPDATES

@@ -5,6 +5,7 @@ This is a summary of ChangeLog basically.
 * No longer reading in /etc/hosts, still reading .hosts though
 * Disabled all the DEBUG emailing and context shit, it was utterly pointless
 * Fixed closed-invite not being checked correctly.
+* Fixed segfault while relaying.
 
 1.2
 * No longer displaying SALTS on ./bin -v

+ 1 - 1
src/botnet.c

@@ -1253,7 +1253,7 @@ static void pre_relay(int idx, char *buf, register int len)
   register int tidx = (-1), i;
 
   for (i = 0; i < dcc_total; i++) {
-    if (dcc[i].type && !dcc[i].addr && (dcc[i].u.relay->sock == dcc[idx].sock)) {
+    if (dcc[i].type && dcc[i].type == &DCC_FORK_RELAY && !dcc[i].addr && (dcc[i].u.relay->sock == dcc[idx].sock)) {
       tidx = i;
       break;
     }