]> andersk Git - moira.git/commitdiff
fixed a couple of typos in error messages
authorjweiss <jweiss>
Thu, 4 Aug 1994 18:25:03 +0000 (18:25 +0000)
committerjweiss <jweiss>
Thu, 4 Aug 1994 18:25:03 +0000 (18:25 +0000)
if you try to change the pobox fo a non-existant user it reported
the error, and asked if you wated to set a pobox, even tho it would
never let you, now it returs after the first error.

clients/moira/pobox.c

index 5f03bec175807e50fbca3d6e53a98c41f044abde..5b6a174d3681670f52ef7f137f78a16051b40103 100644 (file)
@@ -168,13 +168,30 @@ char **argv;
     register int status;
     char *type, temp_buf[BUFSIZ], *local_user, *args[10], box[BUFSIZ];
     char *temp_box;
+    struct qelem * top = NULL;
     local_user = argv[1];
 
     if (!ValidName(local_user))
        return(DM_NORMAL);
     
-    (void) GetUserPOBox(argc, argv); /* print current info. */
-    
+    /* Print the current PO Box info */
+    switch (status = do_mr_query("get_pobox", 1, argv + 1, StoreInfo, 
+                                 (char *)&top)) {
+    case MR_SUCCESS:
+       sprintf(temp_buf,"Current pobox for user %s: \n", local_user);
+       Put_message("");
+       top = QueueTop(top);
+       Loop(top, PrintPOBox);  /* should only return 1 box. */
+       FreeQueue(top);
+       break;
+    case MR_NO_MATCH:
+       Put_message("This user has no P.O. Box.");
+       break;
+    default:
+       com_err(program_name, status, " in get_pobox.");
+       return(DM_NORMAL); 
+    }
+
     sprintf(temp_buf, "Assign %s a local PO Box (y/n)", local_user);
     switch (YesNoQuestion(temp_buf, TRUE)) {
     case TRUE:
@@ -198,7 +215,7 @@ char **argv;
                    return(DM_NORMAL);
                break;
            default:
-               com_err(program_name, status, "in set_pobox_pop.");
+               com_err(program_name, status, " in set_pobox_pop.");
                return(DM_NORMAL);
            }
            break;
@@ -270,7 +287,7 @@ char ** argv;
     if (Confirm(temp_buf)) {
        if ( (status = do_mr_query("delete_pobox", 1, argv + 1,
                                    Scream, NULL)) != MR_SUCCESS)
-           com_err(program_name, status, "in delete_pobox.");
+           com_err(program_name, status, " in delete_pobox.");
        else
            Put_message("PO Box removed.");
     }
This page took 0.082858 seconds and 5 git commands to generate.