]> andersk Git - moira.git/commitdiff
Use mrcl_connect() so we send a query version.
authorzacheiss <zacheiss>
Sun, 20 May 2001 10:22:10 +0000 (10:22 +0000)
committerzacheiss <zacheiss>
Sun, 20 May 2001 10:22:10 +0000 (10:22 +0000)
clients/moira/namespace.c

index a383aa351d0ddd05dc3314f24a53a143c823b59c..7a3eb0269644a82035cfe4a45e01415367d9a192 100644 (file)
@@ -14,6 +14,7 @@
 
 #include <mit-copyright.h>
 #include <moira.h>
+#include <mrclient.h>
 #include "defs.h"
 #include "f_defs.h"
 #include "globals.h"
@@ -223,30 +224,9 @@ int main(int argc, char **argv)
        }
     }
 
-  if ((status = mr_connect(moira_server)))
-    ErrorExit("\nConnection to Moira server failed", status);
-
-  /* do this now since calling mr_connect initialized the krb error table
-   * for us.
-   */
-  if ((status = tf_init(TKT_FILE, R_TKT_FIL)) ||
-      (status = tf_get_pname(pname)))
-    {
-      com_err(whoami, status, "cannot find your ticket file");
-      exit(1);
-    }
-  tf_close();
-  user = strdup(pname);
-
-  if ((status = mr_motd(&motd)))
-    ErrorExit("\nUnable to check server status", status);
-  if (motd)
-    {
-      fprintf(stderr, "The Moira server is currently unavailable:\n%s\n",
-             motd);
-      mr_disconnect();
-      exit(1);
-    }
+  if (mrcl_connect(moira_server, program_name, QUERY_VERSION, 0)
+      != MRCL_SUCCESS)
+    exit(1);
 
   if ((status = mr_auth(program_name)))
     {
This page took 0.08402 seconds and 5 git commands to generate.