6 * Copyright (C) 1987 by the Massachusetts Institute of Technology
8 * This routine is part of the client library. It handles
9 * creating a connection to the sms server.
13 static char *rcsid_sms_connect_c = "$Header$";
16 #include "sms_private.h"
19 * Open a connection to the sms server.
26 if (!sms_inited) sms_init();
27 if (_sms_conn) return SMS_ALREADY_CONNECTED;
30 * * should do a hesiod call to find the sms machine name & service
33 /* XXX gdb doesn't give real return codes. Can we trust errno?*/
35 _sms_conn = start_server_connection(SMS_GDB_SERV, "");
36 if (_sms_conn == NULL) {
45 _sms_conn = sever_connection(_sms_conn);
53 struct sms_params *params = NULL;
54 struct sms_params *reply = NULL;
58 params->sms_procno = SMS_NOOP;
60 params->sms_argl = NULL;
61 params->sms_argv = NULL;
63 if ((status = sms_do_call(params, &reply)) == 0)
64 status = reply->sms_status;
66 sms_destroy_reply(reply);
75 * c-continued-statement-offset: 4