Rewrite DNS lookup API to remove a memory leak and keep it from coming back.
[ircu2.10.12-pk.git] / ircd / s_serv.c
index 7a6d68570498771045488845f6660404ace74477..bc09198f80a813777e647c5cd4d34e9e581b81ca 100644 (file)
@@ -148,9 +148,6 @@ int server_estab(struct Client *cptr, struct ConfItem *aconf)
   SetServer(cptr);
   cli_handler(cptr) = SERVER_HANDLER;
   Count_unknownbecomesserver(UserStats);
-
-  release_dns_reply(cptr);
-
   SetBurst(cptr);
 
 /*    nextping = CurrentTime; */
@@ -193,10 +190,10 @@ int server_estab(struct Client *cptr, struct ConfItem *aconf)
     if (!match(cli_name(&me), cli_name(cptr)))
       continue;
     sendcmdto_one(&me, CMD_SERVER, acptr,
-                 "%s 2 0 %Tu J%02u %s%s +%s%s :%s", cli_name(cptr),
+                 "%s 2 0 %Tu J%02u %s%s +%s%s%s :%s", cli_name(cptr),
                  cli_serv(cptr)->timestamp, Protocol(cptr), NumServCap(cptr),
                  IsHub(cptr) ? "h" : "", IsService(cptr) ? "s" : "",
-                 cli_info(cptr));
+                 IsIPv6(cptr) ? "6" : "", cli_info(cptr));
   }
 
   /* Send these as early as possible so that glined users/juped servers can
@@ -210,8 +207,8 @@ int server_estab(struct Client *cptr, struct ConfItem *aconf)
    * Pass on my client information to the new server
    *
    * First, pass only servers (idea is that if the link gets
-   * cancelled beacause the server was already there,
-   * there are no NICK's to be cancelled...). Of course,
+   * canceled because the server was already there,
+   * there are no NICK's to be canceled...). Of course,
    * if cancellation occurs, all this info is sent anyway,
    * and I guess the link dies when a read is attempted...? --msa
    *
@@ -236,11 +233,11 @@ int server_estab(struct Client *cptr, struct ConfItem *aconf)
       if (0 == match(cli_name(&me), cli_name(acptr)))
         continue;
       sendcmdto_one(cli_serv(acptr)->up, CMD_SERVER, cptr,
-                   "%s %d 0 %Tu %s%u %s%s +%s%s :%s", cli_name(acptr),
+                   "%s %d 0 %Tu %s%u %s%s +%s%s%s :%s", cli_name(acptr),
                    cli_hopcount(acptr) + 1, cli_serv(acptr)->timestamp,
                    protocol_str, Protocol(acptr), NumServCap(acptr),
                    IsHub(acptr) ? "h" : "", IsService(acptr) ? "s" : "",
-                   cli_info(acptr));
+                   IsIPv6(acptr) ? "6" : "", cli_info(acptr));
     }
   }