diff options
Diffstat (limited to 'tool/sqlite3_rsync.c')
-rw-r--r-- | tool/sqlite3_rsync.c | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/tool/sqlite3_rsync.c b/tool/sqlite3_rsync.c index 760559aec..6607e1fb0 100644 --- a/tool/sqlite3_rsync.c +++ b/tool/sqlite3_rsync.c @@ -30,12 +30,13 @@ static const char zUsage[] = "\n" "OPTIONS:\n" "\n" - " --exe PATH Name of the sqlite3_rsync program on the remote side\n" - " --help Show this help screen\n" - " --ssh PATH Name of the SSH program used to reach the remote side\n" - " -v Verbose. Multiple v's for increasing output\n" - " --version Show detailed version information\n" - " --wal-only Do not sync unless both databases are in WAL mode\n" + " --exe PATH Name of the sqlite3_rsync program on the remote side\n" + " --help Show this help screen\n" + " --protocol N Use sync protocol version N.\n" + " --ssh PATH Name of the SSH program used to reach the remote side\n" + " -v Verbose. Multiple v's for increasing output\n" + " --version Show detailed version information\n" + " --wal-only Do not sync unless both databases are in WAL mode\n" ; typedef unsigned char u8; @@ -2029,6 +2030,15 @@ int main(int argc, char const * const *argv){ ctx.eVerbose += numVs(z); continue; } + if( strcmp(z, "-protocol")==0 ){ + ctx.iProtocol = atoi(cli_opt_val); + if( ctx.iProtocol<1 ){ + ctx.iProtocol = 1; + }else if( ctx.iProtocol>PROTOCOL_VERSION ){ + ctx.iProtocol = PROTOCOL_VERSION; + } + continue; + } if( strcmp(z, "-ssh")==0 ){ zSsh = cli_opt_val; continue; @@ -2089,17 +2099,6 @@ int main(int argc, char const * const *argv){ zRemoteDebugFile = cli_opt_val; continue; } - if( strcmp(z, "-protocol")==0 ){ - /* DEBUG OPTION: --protocool N - ** Set the protocol version to N */ - ctx.iProtocol = atoi(cli_opt_val); - if( ctx.iProtocol<1 ){ - ctx.iProtocol = 1; - }else if( ctx.iProtocol>PROTOCOL_VERSION ){ - ctx.iProtocol = PROTOCOL_VERSION; - } - continue; - } if( strcmp(z,"-commcheck")==0 ){ /* DEBUG ONLY */ /* Run a communication check with the remote side. Do not attempt ** to exchange any database connection */ |