]> andersk Git - moira.git/commitdiff
Use two mqelem structs so we don't stomp on ourselves.
authorzacheiss <zacheiss>
Sat, 15 Sep 2001 19:39:05 +0000 (19:39 +0000)
committerzacheiss <zacheiss>
Sat, 15 Sep 2001 19:39:05 +0000 (19:39 +0000)
clients/moira/cluster.c

index 1d7d2a0c739fe88892913ad65c86623dcdf36b46..f3275bb005a1e1819e908ee315e092969ec6e875 100644 (file)
@@ -235,7 +235,7 @@ static char *PrintMachInfo(char **info)
 {
   char buf[BUFSIZ], tbuf[256];
   char *args[3];
-  struct mqelem *elem = NULL;
+  struct mqelem *elem = NULL, *elem2 = NULL;
   int stat;
 
   Put_message("");
@@ -292,16 +292,17 @@ static char *PrintMachInfo(char **info)
    *  Private.
    */
   args[0] = info[M_SUBNET];
-  stat = do_mr_query("get_subnet", 1, args, StoreInfo, &elem);
+  stat = do_mr_query("get_subnet", 1, args, StoreInfo, &elem2);
   if (stat)
     com_err(program_name, stat, " looking up subnet info");
-  else if (atoi(((char **)elem->q_data)[2]) == SNET_STATUS_PRIVATE)
+  else if (atoi(((char **)elem2->q_data)[2]) == SNET_STATUS_PRIVATE)
     {
       Put_message("");
       sprintf(buf, "Warning:  This host is on a private subnet.");
       Put_message(buf);
       sprintf(buf, "Billing information shown is superceded by billing information for the subnet.");
       Put_message(buf);
+      FreeQueue(elem2);
     }
 
   return info[M_NAME];
This page took 0.069052 seconds and 5 git commands to generate.