Fossil SCM

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..

meeks 2012-09-12 00:35 trunk
Commit 66a45382ebd52f0216ea375f85aaf89a640798cd
1 file changed +4 -1
--- src/http_transport.c
+++ src/http_transport.c
@@ -158,13 +158,16 @@
158158
blob_reset(&zCmd);
159159
160160
/* Send an "echo" command to the other side to make sure that the
161161
** connection is up and working.
162162
*/
163
+ zIn = fossil_malloc(16000);
164
+ fprintf(sshOut, "echo .\n");
165
+ fflush(sshOut);
166
+ sshin_read(zIn, 16000);
163167
fprintf(sshOut, "echo test\n");
164168
fflush(sshOut);
165
- zIn = fossil_malloc(16000);
166169
sshin_read(zIn, 16000);
167170
if( memcmp(zIn, "test", 4)!=0 ){
168171
pclose2(sshIn, sshOut, sshPid);
169172
fossil_fatal("ssh connection failed: [%s]", zIn);
170173
}
171174
--- src/http_transport.c
+++ src/http_transport.c
@@ -158,13 +158,16 @@
158 blob_reset(&zCmd);
159
160 /* Send an "echo" command to the other side to make sure that the
161 ** connection is up and working.
162 */
 
 
 
 
163 fprintf(sshOut, "echo test\n");
164 fflush(sshOut);
165 zIn = fossil_malloc(16000);
166 sshin_read(zIn, 16000);
167 if( memcmp(zIn, "test", 4)!=0 ){
168 pclose2(sshIn, sshOut, sshPid);
169 fossil_fatal("ssh connection failed: [%s]", zIn);
170 }
171
--- src/http_transport.c
+++ src/http_transport.c
@@ -158,13 +158,16 @@
158 blob_reset(&zCmd);
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 fossil_fatal("ssh connection failed: [%s]", zIn);
173 }
174

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button