| ︙ | | | ︙ | |
443
444
445
446
447
448
449
450
451
452
453
454
455
456
|
@ gimme %s(zUuid)
}
db_finalize(&q);
}
if( isPull ){
send_all_pending(0);
}
db_end_transaction(0);
}
/*
** COMMAND: test-xfer
**
** This command is used for debugging the server. There is a single
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
|
@ gimme %s(zUuid)
}
db_finalize(&q);
}
if( isPull ){
send_all_pending(0);
}
if( isPush || isPull ){
/* Always send our leaves */
Stmt q;
db_prepare(&q,
"SELECT uuid FROM blob WHERE rid IN"
" (SELECT cid FROM plink EXCEPT SELECT pid FROM plink)"
);
while( db_step(&q)==SQLITE_ROW ){
const char *zUuid = db_column_text(&q, 0);
@ leaf %s(zUuid)
}
db_finalize(&q);
}
db_end_transaction(0);
}
/*
** COMMAND: test-xfer
**
** This command is used for debugging the server. There is a single
|
| ︙ | | | ︙ | |
496
497
498
499
500
501
502
503
504
505
506
507
508
509
|
int go = 1; /* Loop until zero */
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;
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 );
|
>
|
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
|
int go = 1; /* Loop until zero */
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 );
|
| ︙ | | | ︙ | |
576
577
578
579
580
581
582
583
584
585
586
587
588
589
|
}
db_finalize(&q);
}
/* Exchange messages with the server */
printf("Send: %d files, %d requests, %d other messages\n",
nFile, nReq, nMsg);
nFile = nReq = nMsg = 0;
http_exchange(&send, &recv);
blob_reset(&send);
/* Process the reply that came back from the server */
while( blob_line(&recv, &line) ){
nToken = blob_tokenize(&line, aToken, count(aToken));
|
>
|
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
|
}
db_finalize(&q);
}
/* Exchange messages with the server */
printf("Send: %d files, %d requests, %d other messages\n",
nFile, nReq, nMsg);
nFileSend = nFile;
nFile = nReq = nMsg = 0;
http_exchange(&send, &recv);
blob_reset(&send);
/* Process the reply that came back from the server */
while( blob_line(&recv, &line) ){
nToken = blob_tokenize(&line, aToken, count(aToken));
|
| ︙ | | | ︙ | |
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
|
fossil_fatal("%b", &errmsg);
}
blobarray_reset(aToken, nToken);
}
blob_reset(&recv);
printf("Received: %d files, %d requests, %d other messages\n",
nFile, nReq, nMsg);
nFile = nReq = nMsg = 0;
};
http_close();
db_end_transaction(0);
db_multi_exec(
"DROP TABLE onremote;"
"DROP TABLE pending;"
);
}
|
>
|
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;"
);
}
|