]> andersk Git - moira.git/commitdiff
Use the new error reporting interface provided by libmrclient.
authorzacheiss <zacheiss>
Thu, 10 Aug 2000 02:27:41 +0000 (02:27 +0000)
committerzacheiss <zacheiss>
Thu, 10 Aug 2000 02:27:41 +0000 (02:27 +0000)
clients/chpobox/chpobox.c
clients/moira/pobox.c

index 7e9e3259ac4bf92f183926b27b294a9869696de9..9aef2c8182ade8ff11e16f5b50ae77cf32224a6a 100644 (file)
@@ -109,6 +109,8 @@ int main(int argc, char *argv[])
       char *addr;
       if (mrcl_validate_pobox_smtp(uname, address, &addr) != MRCL_SUCCESS)
        {
+         if (mrcl_get_message())
+           mrcl_com_err(whoami);
          printf("\n");
          goto show;
        }
@@ -143,7 +145,7 @@ show:
   if (status == MR_NO_MATCH)
     printf("User %s has no pobox.\n", uname);
   else if (status != 0)
-    com_err(whoami, status, "while retrieving current mailbox");
+    mrcl_com_err(whoami);
   mr_disconnect();
   exit(0);
 }
index 7489fb26388c5613da4bb3110308315d5dd9e41f..2199d3bbc8949c909bc0856a93c167bccd9e59a0 100644 (file)
@@ -498,7 +498,11 @@ int SetUserPOBox(int argc, char **argv)
            return DM_NORMAL;
          if (mrcl_validate_pobox_smtp(local_user, temp_buf, &box) !=
              MRCL_SUCCESS)
-           return DM_NORMAL;
+           {
+             if (mrcl_get_message())
+               Put_message(mrcl_get_message());
+             return DM_NORMAL;
+           }
          break;
        case FALSE:
        default:
@@ -542,7 +546,11 @@ int SplitUserPOBox(int argc, char **argv)
     return DM_NORMAL;
   if (mrcl_validate_pobox_smtp(argv[1], temp_buf, &box) !=
       MRCL_SUCCESS)
-    return DM_NORMAL;
+    {
+      if (mrcl_get_message())
+       Put_message(mrcl_get_message());
+      return DM_NORMAL;
+    }
 
   args[0] = argv[1];
   args[1] = "SPLIT";
This page took 0.043195 seconds and 5 git commands to generate.