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").
Commit
0dba0f4b99c7de08cbb2e6a4666bef80b64b6718fef6ef17821850624af95ae7
Parent
1eefb8dbec7b42f…
1 file changed
+1
-1
+1
-1
| --- src/xfer.c | ||
| +++ src/xfer.c | ||
| @@ -1818,11 +1818,10 @@ | ||
| 1818 | 1818 | blob_zero(&send); |
| 1819 | 1819 | blob_zero(&recv); |
| 1820 | 1820 | blob_zero(&xfer.err); |
| 1821 | 1821 | blob_zero(&xfer.line); |
| 1822 | 1822 | origConfigRcvMask = 0; |
| 1823 | - zClientId = db_lget("client-id", 0); | |
| 1824 | 1823 | |
| 1825 | 1824 | /* Send the send-private pragma if we are trying to sync private data */ |
| 1826 | 1825 | if( syncFlags & SYNC_PRIVATE ){ |
| 1827 | 1826 | blob_append(&send, "pragma send-private\n", -1); |
| 1828 | 1827 | } |
| @@ -1832,10 +1831,11 @@ | ||
| 1832 | 1831 | int vid = db_lget_int("checkout",0); |
| 1833 | 1832 | zCkinLock = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", vid); |
| 1834 | 1833 | }else{ |
| 1835 | 1834 | zCkinLock = 0; |
| 1836 | 1835 | } |
| 1836 | + zClientId = g.localOpen ? db_lget("client-id", 0) : 0; | |
| 1837 | 1837 | |
| 1838 | 1838 | /* When syncing unversioned files, create a TEMP table in which to store |
| 1839 | 1839 | ** the names of files that need to be sent from client to server. |
| 1840 | 1840 | ** |
| 1841 | 1841 | ** The initial assumption is that all unversioned files need to be sent |
| 1842 | 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 | 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 |