From: zacheiss Date: Sun, 20 May 2001 10:22:10 +0000 (+0000) Subject: Use mrcl_connect() so we send a query version. X-Git-Url: http://andersk.mit.edu/gitweb/moira.git/commitdiff_plain/5853547e16ceb4148a1f41a797c2b6f13a3d2e5f Use mrcl_connect() so we send a query version. --- diff --git a/clients/moira/namespace.c b/clients/moira/namespace.c index a383aa35..7a3eb026 100644 --- a/clients/moira/namespace.c +++ b/clients/moira/namespace.c @@ -14,6 +14,7 @@ #include #include +#include #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))) {