Fossil

Check-in [5d00d241]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:work time to time.. *** rely on a delay, which is not good don't work all the time... need to build more solid logic..
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | mg_sshfix
Files: files | file ages | folders
SHA1:5d00d241f78610c3b37336dfd1ea37871e8707f6
User & Date: mgagnon 2012-09-12 02:19:14
Original User & Date: martine 2012-09-12 02:19:14
Context
2012-09-12
12:59
Seems to fix it.. will try on the real conditions.. check-in: e8fac25a user: mgagnon tags: mg_sshfix
02:19
work time to time.. *** rely on a delay, which is not good don't work all the time... need to build more solid logic.. check-in: 5d00d241 user: mgagnon tags: mg_sshfix
00:35
attemp to fix ssh problem on debian linux host when non interactive shell still print some message (motd and mail checking stuff).
*** not really working yet..
check-in: 66a45382 user: mgagnon tags: mg_sshfix
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/http_transport.c.

157
158
159
160
161
162
163
164
165

166

167
168
169
170
171
172
173
    }
    blob_reset(&zCmd);

    /* Send an "echo" command to the other side to make sure that the
    ** connection is up and working.
    */
    zIn = fossil_malloc(16000);
    fprintf(sshOut, "echo .\n");
    fflush(sshOut);

    sshin_read(zIn, 16000);

    fprintf(sshOut, "echo test\n");
    fflush(sshOut);
    sshin_read(zIn, 16000);
    if( memcmp(zIn, "test", 4)!=0 ){
      pclose2(sshIn, sshOut, sshPid);
      fossil_fatal("ssh connection failed: [%s]", zIn);
    }







|

>

>







157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
    }
    blob_reset(&zCmd);

    /* Send an "echo" command to the other side to make sure that the
    ** connection is up and working.
    */
    zIn = fossil_malloc(16000);
    fprintf(sshOut, "echo toto\n");
    fflush(sshOut);
    usleep(2000000);
    sshin_read(zIn, 16000);
    fossil_print("Second Read: [%s]\n", zIn);
    fprintf(sshOut, "echo test\n");
    fflush(sshOut);
    sshin_read(zIn, 16000);
    if( memcmp(zIn, "test", 4)!=0 ){
      pclose2(sshIn, sshOut, sshPid);
      fossil_fatal("ssh connection failed: [%s]", zIn);
    }