Fossil SCM

Always adjust the use-path-for-ssh setting when an ssh retry succeeds, even if the REMEMBER flag is not set. And store the setting locally instead of globally.

drh 2024-02-06 12:01 trunk
Commit 857495ec92a521bb5472105679b50330818e2f22766c68731e75df1f37f32183
1 file changed +3 -3
+3 -3
--- src/http.c
+++ src/http.c
@@ -512,16 +512,16 @@
512512
printf("Retry after %s the PATH= argument to the SSH command\n",
513513
(g.url.flags & URL_SSH_PATH)!=0 ? "removing" : "adding");
514514
}
515515
g.url.flags ^= URL_SSH_PATH|URL_SSH_RETRY;
516516
rc = http_exchange(pSend,pReply,mHttpFlags,0,zAltMimetype);
517
- if( rc==0 && (g.url.flags & URL_REMEMBER)!=0 ){
517
+ if( rc==0 ){
518518
char *z = mprintf("use-path-for-ssh:%s", g.url.hostname);
519519
if( (g.url.flags & URL_SSH_PATH) ){
520
- db_set(z/*works-like:"x"*/, "1", 1);
520
+ db_set(z/*works-like:"x"*/, "1", 0);
521521
}else{
522
- db_unset(z/*works-like:"x"*/, 1);
522
+ db_unset(z/*works-like:"x"*/, 0);
523523
}
524524
fossil_free(z);
525525
}
526526
return rc;
527527
}else{
528528
--- src/http.c
+++ src/http.c
@@ -512,16 +512,16 @@
512 printf("Retry after %s the PATH= argument to the SSH command\n",
513 (g.url.flags & URL_SSH_PATH)!=0 ? "removing" : "adding");
514 }
515 g.url.flags ^= URL_SSH_PATH|URL_SSH_RETRY;
516 rc = http_exchange(pSend,pReply,mHttpFlags,0,zAltMimetype);
517 if( rc==0 && (g.url.flags & URL_REMEMBER)!=0 ){
518 char *z = mprintf("use-path-for-ssh:%s", g.url.hostname);
519 if( (g.url.flags & URL_SSH_PATH) ){
520 db_set(z/*works-like:"x"*/, "1", 1);
521 }else{
522 db_unset(z/*works-like:"x"*/, 1);
523 }
524 fossil_free(z);
525 }
526 return rc;
527 }else{
528
--- src/http.c
+++ src/http.c
@@ -512,16 +512,16 @@
512 printf("Retry after %s the PATH= argument to the SSH command\n",
513 (g.url.flags & URL_SSH_PATH)!=0 ? "removing" : "adding");
514 }
515 g.url.flags ^= URL_SSH_PATH|URL_SSH_RETRY;
516 rc = http_exchange(pSend,pReply,mHttpFlags,0,zAltMimetype);
517 if( rc==0 ){
518 char *z = mprintf("use-path-for-ssh:%s", g.url.hostname);
519 if( (g.url.flags & URL_SSH_PATH) ){
520 db_set(z/*works-like:"x"*/, "1", 0);
521 }else{
522 db_unset(z/*works-like:"x"*/, 0);
523 }
524 fossil_free(z);
525 }
526 return rc;
527 }else{
528

Keyboard Shortcuts

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