Fossil SCM
work time to time.. *** rely on a delay, which is not good don't work all the time... need to build more solid logic..
Commit
5d00d241f78610c3b37336dfd1ea37871e8707f6
Parent
66a45382ebd52f0…
1 file changed
+3
-1
+3
-1
| --- src/http_transport.c | ||
| +++ src/http_transport.c | ||
| @@ -159,13 +159,15 @@ | ||
| 159 | 159 | |
| 160 | 160 | /* Send an "echo" command to the other side to make sure that the |
| 161 | 161 | ** connection is up and working. |
| 162 | 162 | */ |
| 163 | 163 | zIn = fossil_malloc(16000); |
| 164 | - fprintf(sshOut, "echo .\n"); | |
| 164 | + fprintf(sshOut, "echo toto\n"); | |
| 165 | 165 | fflush(sshOut); |
| 166 | + usleep(2000000); | |
| 166 | 167 | sshin_read(zIn, 16000); |
| 168 | + fossil_print("Second Read: [%s]\n", zIn); | |
| 167 | 169 | fprintf(sshOut, "echo test\n"); |
| 168 | 170 | fflush(sshOut); |
| 169 | 171 | sshin_read(zIn, 16000); |
| 170 | 172 | if( memcmp(zIn, "test", 4)!=0 ){ |
| 171 | 173 | pclose2(sshIn, sshOut, sshPid); |
| 172 | 174 |
| --- src/http_transport.c | |
| +++ src/http_transport.c | |
| @@ -159,13 +159,15 @@ | |
| 159 | |
| 160 | /* Send an "echo" command to the other side to make sure that the |
| 161 | ** connection is up and working. |
| 162 | */ |
| 163 | zIn = fossil_malloc(16000); |
| 164 | fprintf(sshOut, "echo .\n"); |
| 165 | fflush(sshOut); |
| 166 | sshin_read(zIn, 16000); |
| 167 | fprintf(sshOut, "echo test\n"); |
| 168 | fflush(sshOut); |
| 169 | sshin_read(zIn, 16000); |
| 170 | if( memcmp(zIn, "test", 4)!=0 ){ |
| 171 | pclose2(sshIn, sshOut, sshPid); |
| 172 |
| --- src/http_transport.c | |
| +++ src/http_transport.c | |
| @@ -159,13 +159,15 @@ | |
| 159 | |
| 160 | /* Send an "echo" command to the other side to make sure that the |
| 161 | ** connection is up and working. |
| 162 | */ |
| 163 | zIn = fossil_malloc(16000); |
| 164 | fprintf(sshOut, "echo toto\n"); |
| 165 | fflush(sshOut); |
| 166 | usleep(2000000); |
| 167 | sshin_read(zIn, 16000); |
| 168 | fossil_print("Second Read: [%s]\n", zIn); |
| 169 | fprintf(sshOut, "echo test\n"); |
| 170 | fflush(sshOut); |
| 171 | sshin_read(zIn, 16000); |
| 172 | if( memcmp(zIn, "test", 4)!=0 ){ |
| 173 | pclose2(sshIn, sshOut, sshPid); |
| 174 |