if (_sms_conn) return SMS_ALREADY_CONNECTED;
/*
- * * should do a hesiod call to find the sms machine name & service
- * * number/name.
- * */
- /* XXX gdb doesn't give real return codes. Can we trust errno?*/
+ * XXX should do a hesiod call to find the sms machine name & service
+ * number/name.
+ */
errno = 0;
_sms_conn = start_server_connection(SMS_GDB_SERV, "");
- if (_sms_conn == NULL) {
+ if (_sms_conn == NULL)
return errno;
+ if (connection_status(_sms_conn) == CON_STOPPED) {
+ register status = connection_errno(_sms_conn);
+ sms_disconnect();
+ return status;
}
return 0;
}