Fossil SCM

Always do at least two cycles with no file transfers before quiting.

drh 2007-08-01 10:29 trunk
Commit 35d7ba08aca1768ba4b61bd6d9e2dcc2e3e01c70
1 file changed +9 -1
+9 -1
--- src/xfer.c
+++ src/xfer.c
@@ -513,10 +513,11 @@
513513
const char *zPCode = db_get("project-code", 0);
514514
int nFile = 0;
515515
int nMsg = 0;
516516
int nReq = 0;
517517
int nFileSend;
518
+ int nNoFileCycle = 0;
518519
Blob send; /* Text we are sending to the server */
519520
Blob recv; /* Reply we got back from the server */
520521
Blob line; /* A single line of the reply */
521522
Blob aToken[5]; /* A tokenization of line */
522523
Blob errmsg; /* Error message */
@@ -704,15 +705,22 @@
704705
blobarray_reset(aToken, nToken);
705706
}
706707
blob_reset(&recv);
707708
printf("Received: %d files, %d requests, %d other messages\n",
708709
nFile, nReq, nMsg);
709
- if( nFileSend + nFile==0 ){ go = 0; }
710
+ if( nFileSend + nFile==0 ){
711
+ nNoFileCycle++;
712
+ if( nNoFileCycle>1 ){
713
+ go = 0;
714
+ }
715
+ }else{
716
+ nNoFileCycle = 0;
717
+ }
710718
nFile = nReq = nMsg = 0;
711719
};
712720
http_close();
713721
db_end_transaction(0);
714722
db_multi_exec(
715723
"DROP TABLE onremote;"
716724
"DROP TABLE pending;"
717725
);
718726
}
719727
--- src/xfer.c
+++ src/xfer.c
@@ -513,10 +513,11 @@
513 const char *zPCode = db_get("project-code", 0);
514 int nFile = 0;
515 int nMsg = 0;
516 int nReq = 0;
517 int nFileSend;
 
518 Blob send; /* Text we are sending to the server */
519 Blob recv; /* Reply we got back from the server */
520 Blob line; /* A single line of the reply */
521 Blob aToken[5]; /* A tokenization of line */
522 Blob errmsg; /* Error message */
@@ -704,15 +705,22 @@
704 blobarray_reset(aToken, nToken);
705 }
706 blob_reset(&recv);
707 printf("Received: %d files, %d requests, %d other messages\n",
708 nFile, nReq, nMsg);
709 if( nFileSend + nFile==0 ){ go = 0; }
 
 
 
 
 
 
 
710 nFile = nReq = nMsg = 0;
711 };
712 http_close();
713 db_end_transaction(0);
714 db_multi_exec(
715 "DROP TABLE onremote;"
716 "DROP TABLE pending;"
717 );
718 }
719
--- src/xfer.c
+++ src/xfer.c
@@ -513,10 +513,11 @@
513 const char *zPCode = db_get("project-code", 0);
514 int nFile = 0;
515 int nMsg = 0;
516 int nReq = 0;
517 int nFileSend;
518 int nNoFileCycle = 0;
519 Blob send; /* Text we are sending to the server */
520 Blob recv; /* Reply we got back from the server */
521 Blob line; /* A single line of the reply */
522 Blob aToken[5]; /* A tokenization of line */
523 Blob errmsg; /* Error message */
@@ -704,15 +705,22 @@
705 blobarray_reset(aToken, nToken);
706 }
707 blob_reset(&recv);
708 printf("Received: %d files, %d requests, %d other messages\n",
709 nFile, nReq, nMsg);
710 if( nFileSend + nFile==0 ){
711 nNoFileCycle++;
712 if( nNoFileCycle>1 ){
713 go = 0;
714 }
715 }else{
716 nNoFileCycle = 0;
717 }
718 nFile = nReq = nMsg = 0;
719 };
720 http_close();
721 db_end_transaction(0);
722 db_multi_exec(
723 "DROP TABLE onremote;"
724 "DROP TABLE pending;"
725 );
726 }
727

Keyboard Shortcuts

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