From: jweiss Date: Thu, 4 Aug 1994 18:25:03 +0000 (+0000) Subject: fixed a couple of typos in error messages X-Git-Tag: OPSSRC_BASE~57 X-Git-Url: http://andersk.mit.edu/gitweb/moira.git/commitdiff_plain/2f25313cedb156dfa7f8dd9c5286300eb973f11d fixed a couple of typos in error messages 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. --- diff --git a/clients/moira/pobox.c b/clients/moira/pobox.c index 5f03bec1..5b6a174d 100644 --- a/clients/moira/pobox.c +++ b/clients/moira/pobox.c @@ -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."); }