Fossil SCM

Only check time, if it is set.

joerg 2013-01-23 12:31 experimental
Commit 970cc4f16f3483c066534e14ed63ce68d374add3
1 file changed +2 -1
+2 -1
--- src/xfer.c
+++ src/xfer.c
@@ -396,11 +396,12 @@
396396
}
397397
if( uuid_is_shunned(blob_str(pUuid)) ){
398398
blob_reset(&uuid);
399399
return;
400400
}
401
- if( time(NULL) >= pXfer->maxTime || pXfer->mxSend<=blob_size(pXfer->pOut) ){
401
+ if( (pXfer->maxTime != -1 && time(NULL) >= pXfer->maxTime) ||
402
+ pXfer->mxSend<=blob_size(pXfer->pOut) ){
402403
const char *zFormat = isPriv ? "igot %b 1\n" : "igot %b\n";
403404
blob_appendf(pXfer->pOut, zFormat, pUuid);
404405
pXfer->nIGotSent++;
405406
blob_reset(&uuid);
406407
return;
407408
--- src/xfer.c
+++ src/xfer.c
@@ -396,11 +396,12 @@
396 }
397 if( uuid_is_shunned(blob_str(pUuid)) ){
398 blob_reset(&uuid);
399 return;
400 }
401 if( time(NULL) >= pXfer->maxTime || pXfer->mxSend<=blob_size(pXfer->pOut) ){
 
402 const char *zFormat = isPriv ? "igot %b 1\n" : "igot %b\n";
403 blob_appendf(pXfer->pOut, zFormat, pUuid);
404 pXfer->nIGotSent++;
405 blob_reset(&uuid);
406 return;
407
--- src/xfer.c
+++ src/xfer.c
@@ -396,11 +396,12 @@
396 }
397 if( uuid_is_shunned(blob_str(pUuid)) ){
398 blob_reset(&uuid);
399 return;
400 }
401 if( (pXfer->maxTime != -1 && time(NULL) >= pXfer->maxTime) ||
402 pXfer->mxSend<=blob_size(pXfer->pOut) ){
403 const char *zFormat = isPriv ? "igot %b 1\n" : "igot %b\n";
404 blob_appendf(pXfer->pOut, zFormat, pUuid);
405 pXfer->nIGotSent++;
406 blob_reset(&uuid);
407 return;
408

Keyboard Shortcuts

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