From 9a2d61b04e52cc4f19fb014d904b486d3c1fae38 Mon Sep 17 00:00:00 2001 From: mar Date: Thu, 1 Dec 1988 14:47:38 +0000 Subject: [PATCH] added server arg to sms_connect --- clients/mailmaint/mailmaint.c | 16 +++------------- clients/moira/main.c | 2 +- clients/moira/utils.c | 2 +- clients/passwd/chpobox.c | 2 +- dcm/dcm.c | 2 +- reg_svr/reg_svr.c | 13 +------------ server/mr_glue.c | 15 ++------------- 7 files changed, 10 insertions(+), 42 deletions(-) diff --git a/clients/mailmaint/mailmaint.c b/clients/mailmaint/mailmaint.c index 802420ef..18da4275 100644 --- a/clients/mailmaint/mailmaint.c +++ b/clients/mailmaint/mailmaint.c @@ -26,6 +26,8 @@ static char rcsid_mailmaint_c[] = "$Header$"; #include #include #include +#include +#include #include #define STARTCOL 0 @@ -128,7 +130,7 @@ main(argc, argv) printf("Connecting to database for %s...please hold on.\n", uname); - status = sms_connect(); + status = sms_connect(SMS_SERVER); if (status) { (void) sprintf(buf, "\nConnection to SMS server failed"); goto punt; @@ -960,15 +962,3 @@ menu_err_hook(who, code, fmt, args) (void) putc('\0', &_strbuf); Put_message(buf); } - - -/* - * Local Variables: - * mode: c - * c-indent-level: 4 - * c-continued-statement-offset: 4 - * c-brace-offset: -4 - * c-argdecl-indent: 4 - * c-label-offset: -4 - * End: - */ diff --git a/clients/moira/main.c b/clients/moira/main.c index 1d46fd2e..a32c5be7 100644 --- a/clients/moira/main.c +++ b/clients/moira/main.c @@ -90,7 +90,7 @@ main(argc, argv) break; } - if ( status = sms_connect() ) + if ( status = sms_connect(SMS_SERVER) ) ErrorExit("\nConnection to SMS server failed", status); if ( status = sms_auth(program_name) ) diff --git a/clients/moira/utils.c b/clients/moira/utils.c index f459f8f0..202c294d 100644 --- a/clients/moira/utils.c +++ b/clients/moira/utils.c @@ -913,7 +913,7 @@ char *hint; status = sms_query(name, argc, argv, proc, hint); if (status != SMS_ABORTED && status != SMS_NOT_CONNECTED) return(status); - status = sms_connect(); + status = sms_connect(SMS_SERVER); if (status) { com_err(whoami, status, " while re-connecting to server"); return(SMS_ABORTED); diff --git a/clients/passwd/chpobox.c b/clients/passwd/chpobox.c index c45ea9d8..42db1d65 100644 --- a/clients/passwd/chpobox.c +++ b/clients/passwd/chpobox.c @@ -122,7 +122,7 @@ main(argc, argv) } smsarg[0] = uname; - status = sms_connect(); + status = sms_connect(SMS_SERVER); if (status) { com_err(whoami, status, " while connecting to SMS"); exit(1); diff --git a/dcm/dcm.c b/dcm/dcm.c index e953a24e..8dfca839 100644 --- a/dcm/dcm.c +++ b/dcm/dcm.c @@ -69,7 +69,7 @@ char *argv[]; exit(1); } - if (status = sms_connect()) { + if (status = sms_connect("")) { com_err(whoami, status, " on sms_connect"); leave("connect failed"); } diff --git a/reg_svr/reg_svr.c b/reg_svr/reg_svr.c index 910c5d36..80141ac7 100644 --- a/reg_svr/reg_svr.c +++ b/reg_svr/reg_svr.c @@ -57,7 +57,7 @@ main(argc,argv) init_ureg_err_tbl(); /* Connect to the SMS server */ - if ((status = sms_connect()) != SMS_SUCCESS) + if ((status = sms_connect(SMS_SERVER)) != SMS_SUCCESS) { com_err(whoami, status, " on connect"); exit(1); @@ -636,14 +636,3 @@ int set_password(message,retval) return status; } - -/* - * Local Variables: - * mode: c - * c-argdecl-indent: 2 - * c-brace-offset: -4 - * c-continued-statement-offset: 4 - * c-indent-level: 4 - * c-label-offset: -2 - * End: - */ diff --git a/server/mr_glue.c b/server/mr_glue.c index 7155c9ab..0fb28aa1 100644 --- a/server/mr_glue.c +++ b/server/mr_glue.c @@ -30,7 +30,8 @@ extern int krb_err_base, errno; extern char *malloc(), *whoami; extern time_t now; -sms_connect() +sms_connect(server) +char *server; { register int status; @@ -193,15 +194,3 @@ trigger_dcm(dummy0, dummy1, cl) return(SMS_SUCCESS); } } - - -/* - * Local Variables: - * mode: c - * c-indent-level: 4 - * c-continued-statement-offset: 4 - * c-brace-offset: -4 - * c-argdecl-indent: 4 - * c-label-offset: -4 - * End: - */ -- 2.45.2