Bug fix: account from previous session had effect when new target command
[egate.git] / kernel / urp.c
index c2c4010..1f1315b 100644 (file)
  * Europagate, 1995
  *
  * $Log: urp.c,v $
- * Revision 1.45  1995/07/20 08:20:24  adam
+ * Revision 1.46  1995/07/28 10:51:09  adam
+ * Bug fix: account from previous session had effect when new target command
+ * was executed.
+ *
+ * Revision 1.45  1995/07/20  08:20:24  adam
  * Minor changes.
  *
  * Revision 1.44  1995/07/11  12:28:53  adam
@@ -512,6 +516,7 @@ static int exec_account (struct ccl_token *list)
     }
     else
         *info.account = '\0';
+    info.account_in_session = 1;
     return 0;
 }
 
@@ -523,7 +528,10 @@ static int exec_target (struct ccl_token *list)
     len = list->len;
     memcpy (info.target, list->name, len);
     info.target [len] = '\0';
-
+    
+    if (!info.account_in_session)
+        *info.account = '\0';
+    info.account_in_session = 0;
     read_kernel_res ();
     return reopen_target ();
 }