瀏覽代碼

* Moved dcc[].u.dns->dns_id to dcc[].dns_id

svn: 1506
Bryan Drewery 21 年之前
父節點
當前提交
b62c8fcdb4
共有 5 個文件被更改,包括 6 次插入6 次删除
  1. 1 1
      src/adns.c
  2. 2 2
      src/botnet.c
  3. 1 1
      src/dcc.c
  4. 1 1
      src/dcc.h
  5. 1 1
      src/mod/server.mod/servmsg.c

+ 1 - 1
src/adns.c

@@ -955,7 +955,7 @@ bool valid_dns_id(int idx, int id)
 {
 {
   if (id == -1)
   if (id == -1)
     return 1;
     return 1;
-  if (valid_idx(idx) && dcc[idx].u.dns && dcc[idx].u.dns->dns_id && dcc[idx].u.dns->dns_id == id)
+  if (valid_idx(idx) && dcc[idx].dns_id && dcc[idx].dns_id == id)
     return 1;
     return 1;
   sdprintf("dns_id: %d is not associated with dead idx: %d", id, idx);
   sdprintf("dns_id: %d is not associated with dead idx: %d", id, idx);
   return 0;
   return 0;

+ 2 - 2
src/botnet.c

@@ -952,7 +952,7 @@ int botlink(char *linker, int idx, char *nick)
 
 
       int dns_id = egg_dns_lookup(bi->address, 20, botlink_dns_callback, (void *) i);
       int dns_id = egg_dns_lookup(bi->address, 20, botlink_dns_callback, (void *) i);
       if (dns_id >= 0)
       if (dns_id >= 0)
-        dcc[i].u.dns->dns_id = dns_id;
+        dcc[i].dns_id = dns_id;
      
      
       return 1;
       return 1;
       /* wait for async reply */
       /* wait for async reply */
@@ -1126,7 +1126,7 @@ void tandem_relay(int idx, char *nick, register int i)
   
   
   int dns_id = egg_dns_lookup(bi->address, 20, tandem_relay_dns_callback, (void *) i);
   int dns_id = egg_dns_lookup(bi->address, 20, tandem_relay_dns_callback, (void *) i);
   if (dns_id >= 0)
   if (dns_id >= 0)
-    dcc[i].u.dns->dns_id = dns_id;
+    dcc[i].dns_id = dns_id;
 
 
   return;
   return;
   /* wait for async reply */
   /* wait for async reply */

+ 1 - 1
src/dcc.c

@@ -1263,7 +1263,7 @@ dcc_telnet(int idx, char *buf, int ii)
 
 
   int dns_id = egg_dns_reverse(s, 20, dcc_telnet_dns_callback, (void *) i);
   int dns_id = egg_dns_reverse(s, 20, dcc_telnet_dns_callback, (void *) i);
   if (dns_id >= 0)
   if (dns_id >= 0)
-    dcc[i].u.dns->dns_id = dns_id;
+    dcc[i].dns_id = dns_id;
 }
 }
 
 
 static void dcc_telnet_dns_callback(int id, void *client_data, const char *ip, char **hosts)
 static void dcc_telnet_dns_callback(int id, void *client_data, const char *ip, char **hosts)

+ 1 - 1
src/dcc.h

@@ -52,6 +52,7 @@ struct dcc_t {
   int simul;                    /* this will hold the idx on the remote bot to return result. */
   int simul;                    /* this will hold the idx on the remote bot to return result. */
   int msgc;			/* forward the output back to irc? */
   int msgc;			/* forward the output back to irc? */
   int whowas;
   int whowas;
+  int dns_id;
   port_t port;
   port_t port;
   char simulbot[NICKLEN];       /* used for hub->leaf cmd simulation, holds bot that results should be sent to */
   char simulbot[NICKLEN];       /* used for hub->leaf cmd simulation, holds bot that results should be sent to */
   char hash[MD5_HASH_LENGTH + 1];                /* used for dcc authing */
   char hash[MD5_HASH_LENGTH + 1];                /* used for dcc authing */
@@ -66,7 +67,6 @@ struct dcc_t {
 struct dns_info {
 struct dns_info {
   char *cbuf;			/* free`d when done */
   char *cbuf;			/* free`d when done */
   char *cptr;
   char *cptr;
-  int dns_id;
   int ibuf;
   int ibuf;
   int ibuf2;
   int ibuf2;
 //  struct dcc_table *type;       /* type we are doing the lookup for          */
 //  struct dcc_table *type;       /* type we are doing the lookup for          */

+ 1 - 1
src/mod/server.mod/servmsg.c

@@ -1383,7 +1383,7 @@ static void connect_server(void)
     /* Resolve the hostname. */
     /* Resolve the hostname. */
     int dns_id = egg_dns_lookup(botserver, 20, server_dns_callback, (void *) newidx);
     int dns_id = egg_dns_lookup(botserver, 20, server_dns_callback, (void *) newidx);
     if (dns_id >= 0)
     if (dns_id >= 0)
-      dcc[newidx].u.dns->dns_id = dns_id;
+      dcc[newidx].dns_id = dns_id;
     /* wait for async reply */
     /* wait for async reply */
   }
   }
 }
 }