Check-in [35d7ba08ac]
Not logged in

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

Overview
Comment:Always do at least two cycles with no file transfers before quiting.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 35d7ba08aca1768ba4b61bd6d9e2dcc2e3e01c70
User & Date: drh 2007-08-01 10:29:17.000
Context
2007-08-01
10:31
Merging in the ipaddr update changes. check-in: dd9633a03d user: drh tags: trunk
10:29
Always do at least two cycles with no file transfers before quiting. check-in: 35d7ba08ac user: drh tags: trunk
10:27
Fixes to the sync algorithm. check-in: 0c102d06c3 user: drh tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/xfer.c.
511
512
513
514
515
516
517

518
519
520
521
522
523
524
  int nToken;
  const char *zSCode = db_get("server-code", "x");
  const char *zPCode = db_get("project-code", 0);
  int nFile = 0;
  int nMsg = 0;
  int nReq = 0;
  int nFileSend;

  Blob send;        /* Text we are sending to the server */
  Blob recv;        /* Reply we got back from the server */
  Blob line;        /* A single line of the reply */
  Blob aToken[5];   /* A tokenization of line */
  Blob errmsg;      /* Error message */

  assert( pushFlag || pullFlag || cloneFlag );







>







511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
  int nToken;
  const char *zSCode = db_get("server-code", "x");
  const char *zPCode = db_get("project-code", 0);
  int nFile = 0;
  int nMsg = 0;
  int nReq = 0;
  int nFileSend;
  int nNoFileCycle = 0;
  Blob send;        /* Text we are sending to the server */
  Blob recv;        /* Reply we got back from the server */
  Blob line;        /* A single line of the reply */
  Blob aToken[5];   /* A tokenization of line */
  Blob errmsg;      /* Error message */

  assert( pushFlag || pullFlag || cloneFlag );
702
703
704
705
706
707
708
709







710
711
712
713
714
715
716
717
718
        fossil_fatal("%b", &errmsg);
      }
      blobarray_reset(aToken, nToken);
    }
    blob_reset(&recv);
    printf("Received:  %d files, %d requests, %d other messages\n",
            nFile, nReq, nMsg);
    if( nFileSend + nFile==0 ){ go = 0; }







    nFile = nReq = nMsg = 0;
  };
  http_close();
  db_end_transaction(0);
  db_multi_exec(
    "DROP TABLE onremote;"
    "DROP TABLE pending;"
  );
}







|
>
>
>
>
>
>
>









703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
        fossil_fatal("%b", &errmsg);
      }
      blobarray_reset(aToken, nToken);
    }
    blob_reset(&recv);
    printf("Received:  %d files, %d requests, %d other messages\n",
            nFile, nReq, nMsg);
    if( nFileSend + nFile==0 ){
      nNoFileCycle++;
      if( nNoFileCycle>1 ){
        go = 0;
      }
    }else{
      nNoFileCycle = 0;
    }
    nFile = nReq = nMsg = 0;
  };
  http_close();
  db_end_transaction(0);
  db_multi_exec(
    "DROP TABLE onremote;"
    "DROP TABLE pending;"
  );
}