Fossil SCM

Make sure the server does not send an 'igot' card for a phantom since this can cause a push to end prematurely.

drh 2010-03-06 02:27 trunk
Commit d6e09ac9343ab2f12d121ad64ca1300f67836905
1 file changed +3
+3
--- src/xfer.c
+++ src/xfer.c
@@ -518,10 +518,11 @@
518518
int cnt = 0;
519519
db_prepare(&q,
520520
"SELECT uuid FROM unclustered JOIN blob USING(rid)"
521521
" WHERE NOT EXISTS(SELECT 1 FROM shun WHERE uuid=blob.uuid)"
522522
" AND NOT EXISTS(SELECT 1 FROM private WHERE rid=blob.rid)"
523
+ " AND NOT EXISTS(SELECT 1 FROM phantom WHERE rid=blob.rid)"
523524
);
524525
while( db_step(&q)==SQLITE_ROW ){
525526
blob_appendf(pXfer->pOut, "igot %s\n", db_column_text(&q, 0));
526527
cnt++;
527528
}
@@ -536,10 +537,11 @@
536537
Stmt q;
537538
db_prepare(&q,
538539
"SELECT uuid FROM blob "
539540
" WHERE NOT EXISTS(SELECT 1 FROM shun WHERE uuid=blob.uuid)"
540541
" AND NOT EXISTS(SELECT 1 FROM private WHERE rid=blob.rid)"
542
+ " AND NOT EXISTS(SELECT 1 FROM phantom WHERE rid=blob.rid)"
541543
);
542544
while( db_step(&q)==SQLITE_ROW ){
543545
blob_appendf(pXfer->pOut, "igot %s\n", db_column_text(&q, 0));
544546
}
545547
db_finalize(&q);
@@ -1064,10 +1066,11 @@
10641066
nCardSent = 0;
10651067
nCardRcvd = 0;
10661068
xfer.nFileSent = 0;
10671069
xfer.nDeltaSent = 0;
10681070
xfer.nGimmeSent = 0;
1071
+ xfer.nIGotSent = 0;
10691072
fflush(stdout);
10701073
http_exchange(&send, &recv, cloneFlag==0 || nCycle>0);
10711074
blob_reset(&send);
10721075
10731076
/* Begin constructing the next message (which might never be
10741077
--- src/xfer.c
+++ src/xfer.c
@@ -518,10 +518,11 @@
518 int cnt = 0;
519 db_prepare(&q,
520 "SELECT uuid FROM unclustered JOIN blob USING(rid)"
521 " WHERE NOT EXISTS(SELECT 1 FROM shun WHERE uuid=blob.uuid)"
522 " AND NOT EXISTS(SELECT 1 FROM private WHERE rid=blob.rid)"
 
523 );
524 while( db_step(&q)==SQLITE_ROW ){
525 blob_appendf(pXfer->pOut, "igot %s\n", db_column_text(&q, 0));
526 cnt++;
527 }
@@ -536,10 +537,11 @@
536 Stmt q;
537 db_prepare(&q,
538 "SELECT uuid FROM blob "
539 " WHERE NOT EXISTS(SELECT 1 FROM shun WHERE uuid=blob.uuid)"
540 " AND NOT EXISTS(SELECT 1 FROM private WHERE rid=blob.rid)"
 
541 );
542 while( db_step(&q)==SQLITE_ROW ){
543 blob_appendf(pXfer->pOut, "igot %s\n", db_column_text(&q, 0));
544 }
545 db_finalize(&q);
@@ -1064,10 +1066,11 @@
1064 nCardSent = 0;
1065 nCardRcvd = 0;
1066 xfer.nFileSent = 0;
1067 xfer.nDeltaSent = 0;
1068 xfer.nGimmeSent = 0;
 
1069 fflush(stdout);
1070 http_exchange(&send, &recv, cloneFlag==0 || nCycle>0);
1071 blob_reset(&send);
1072
1073 /* Begin constructing the next message (which might never be
1074
--- src/xfer.c
+++ src/xfer.c
@@ -518,10 +518,11 @@
518 int cnt = 0;
519 db_prepare(&q,
520 "SELECT uuid FROM unclustered JOIN blob USING(rid)"
521 " WHERE NOT EXISTS(SELECT 1 FROM shun WHERE uuid=blob.uuid)"
522 " AND NOT EXISTS(SELECT 1 FROM private WHERE rid=blob.rid)"
523 " AND NOT EXISTS(SELECT 1 FROM phantom WHERE rid=blob.rid)"
524 );
525 while( db_step(&q)==SQLITE_ROW ){
526 blob_appendf(pXfer->pOut, "igot %s\n", db_column_text(&q, 0));
527 cnt++;
528 }
@@ -536,10 +537,11 @@
537 Stmt q;
538 db_prepare(&q,
539 "SELECT uuid FROM blob "
540 " WHERE NOT EXISTS(SELECT 1 FROM shun WHERE uuid=blob.uuid)"
541 " AND NOT EXISTS(SELECT 1 FROM private WHERE rid=blob.rid)"
542 " AND NOT EXISTS(SELECT 1 FROM phantom WHERE rid=blob.rid)"
543 );
544 while( db_step(&q)==SQLITE_ROW ){
545 blob_appendf(pXfer->pOut, "igot %s\n", db_column_text(&q, 0));
546 }
547 db_finalize(&q);
@@ -1064,10 +1066,11 @@
1066 nCardSent = 0;
1067 nCardRcvd = 0;
1068 xfer.nFileSent = 0;
1069 xfer.nDeltaSent = 0;
1070 xfer.nGimmeSent = 0;
1071 xfer.nIGotSent = 0;
1072 fflush(stdout);
1073 http_exchange(&send, &recv, cloneFlag==0 || nCycle>0);
1074 blob_reset(&send);
1075
1076 /* Begin constructing the next message (which might never be
1077

Keyboard Shortcuts

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