Assign timestamp before it might be used in exit_new_server().
[ircu2.10.12-pk.git] / ircd / m_server.c
index 9708cda421cce8be1dab77dba9a225e1175a109a..a15f66b6d07abc1c52dc816a43c9106b81e76ca3 100644 (file)
@@ -544,6 +544,9 @@ int mr_server(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
   /*
    * Detect protocol
    */
+  hop = atoi(parv[2]);
+  start_timestamp = atoi(parv[3]);
+  timestamp = atoi(parv[4]);
   prot = parse_protocol(parv[5]);
   if (!prot)
     return exit_client_msg(cptr, sptr, &me, "Bogus protocol (%s)", parv[5]);
@@ -551,9 +554,6 @@ int mr_server(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
     return exit_new_server(cptr, sptr, host, timestamp,
                            "Incompatible protocol: %s", parv[5]);
 
-  hop = atoi(parv[2]);
-  start_timestamp = atoi(parv[3]);
-  timestamp = atoi(parv[4]);
   Debug((DEBUG_INFO, "Got SERVER %s with timestamp [%s] age %Tu (%Tu)",
         host, parv[4], start_timestamp, cli_serv(&me)->timestamp));
 
@@ -688,6 +688,9 @@ int ms_server(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
   /*
    * Detect protocol
    */
+  hop = atoi(parv[2]);
+  start_timestamp = atoi(parv[3]);
+  timestamp = atoi(parv[4]);
   prot = parse_protocol(parv[5]);
   if (!prot)
     return exit_client_msg(cptr, sptr, &me, "Bogus protocol (%s)", parv[5]);
@@ -695,9 +698,6 @@ int ms_server(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
     return exit_new_server(cptr, sptr, host, timestamp,
                            "Incompatible protocol: %s", parv[5]);
 
-  hop = atoi(parv[2]);
-  start_timestamp = atoi(parv[3]);
-  timestamp = atoi(parv[4]);
   Debug((DEBUG_INFO, "Got SERVER %s with timestamp [%s] age %Tu (%Tu)",
         host, parv[4], start_timestamp, cli_serv(&me)->timestamp));