Fossil SCM

Do not invoke db_lget() in the sync protocol if the local checkout database is unavailable (such as when running "fossil all sync").

drh 2019-07-12 16:59 trunk
Commit 0dba0f4b99c7de08cbb2e6a4666bef80b64b6718fef6ef17821850624af95ae7
1 file changed +1 -1
+1 -1
--- src/xfer.c
+++ src/xfer.c
@@ -1818,11 +1818,10 @@
18181818
blob_zero(&send);
18191819
blob_zero(&recv);
18201820
blob_zero(&xfer.err);
18211821
blob_zero(&xfer.line);
18221822
origConfigRcvMask = 0;
1823
- zClientId = db_lget("client-id", 0);
18241823
18251824
/* Send the send-private pragma if we are trying to sync private data */
18261825
if( syncFlags & SYNC_PRIVATE ){
18271826
blob_append(&send, "pragma send-private\n", -1);
18281827
}
@@ -1832,10 +1831,11 @@
18321831
int vid = db_lget_int("checkout",0);
18331832
zCkinLock = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", vid);
18341833
}else{
18351834
zCkinLock = 0;
18361835
}
1836
+ zClientId = g.localOpen ? db_lget("client-id", 0) : 0;
18371837
18381838
/* When syncing unversioned files, create a TEMP table in which to store
18391839
** the names of files that need to be sent from client to server.
18401840
**
18411841
** The initial assumption is that all unversioned files need to be sent
18421842
--- src/xfer.c
+++ src/xfer.c
@@ -1818,11 +1818,10 @@
1818 blob_zero(&send);
1819 blob_zero(&recv);
1820 blob_zero(&xfer.err);
1821 blob_zero(&xfer.line);
1822 origConfigRcvMask = 0;
1823 zClientId = db_lget("client-id", 0);
1824
1825 /* Send the send-private pragma if we are trying to sync private data */
1826 if( syncFlags & SYNC_PRIVATE ){
1827 blob_append(&send, "pragma send-private\n", -1);
1828 }
@@ -1832,10 +1831,11 @@
1832 int vid = db_lget_int("checkout",0);
1833 zCkinLock = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", vid);
1834 }else{
1835 zCkinLock = 0;
1836 }
 
1837
1838 /* When syncing unversioned files, create a TEMP table in which to store
1839 ** the names of files that need to be sent from client to server.
1840 **
1841 ** The initial assumption is that all unversioned files need to be sent
1842
--- src/xfer.c
+++ src/xfer.c
@@ -1818,11 +1818,10 @@
1818 blob_zero(&send);
1819 blob_zero(&recv);
1820 blob_zero(&xfer.err);
1821 blob_zero(&xfer.line);
1822 origConfigRcvMask = 0;
 
1823
1824 /* Send the send-private pragma if we are trying to sync private data */
1825 if( syncFlags & SYNC_PRIVATE ){
1826 blob_append(&send, "pragma send-private\n", -1);
1827 }
@@ -1832,10 +1831,11 @@
1831 int vid = db_lget_int("checkout",0);
1832 zCkinLock = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", vid);
1833 }else{
1834 zCkinLock = 0;
1835 }
1836 zClientId = g.localOpen ? db_lget("client-id", 0) : 0;
1837
1838 /* When syncing unversioned files, create a TEMP table in which to store
1839 ** the names of files that need to be sent from client to server.
1840 **
1841 ** The initial assumption is that all unversioned files need to be sent
1842

Keyboard Shortcuts

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