]> andersk Git - moira.git/blobdiff - lib/mr_connect.c
Made the default version number 2
[moira.git] / lib / mr_connect.c
index 1cda2e8504c10e737400ab8036466d26c1c72736..f701aac9ad965d361e4c4b215c7411a188aed16f 100644 (file)
@@ -27,14 +27,18 @@ int sms_connect()
     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);
+       if (!status) status = SMS_CANT_CONNECT;
+       sms_disconnect();
+       return status;
     }
     return 0;
 }
@@ -55,6 +59,7 @@ int sms_noop()
 
     CHECK_CONNECTED;
     params = &param_st;
+    params->sms_version_no = sending_version_no;
     params->sms_procno = SMS_NOOP;
     params->sms_argc = 0;
     params->sms_argl = NULL;
This page took 0.035791 seconds and 4 git commands to generate.