148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
|
rc = client_sync(flags, configSync, 0, 0);
}
return rc;
}
/*
** This routine will try a number of times to perform autosync with a
** 0.5 second sleep between attempts.
**
** Return zero on success and non-zero on a failure. If failure occurs
** and doPrompt flag is true, ask the user if they want to continue, and
** if they answer "yes" then return zero in spite of the failure.
*/
int autosync_loop(int flags, int nTries, int doPrompt){
int n = 0;
int rc = 0;
if( (flags & (SYNC_PUSH|SYNC_PULL))==(SYNC_PUSH|SYNC_PULL)
&& db_get_boolean("uv-sync",0)
){
flags |= SYNC_UNVERSIONED;
}
while( (n==0 || n<nTries) && (rc=autosync(flags)) ){
if( rc ){
|
|
>
|
>
|
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
|
rc = client_sync(flags, configSync, 0, 0);
}
return rc;
}
/*
** This routine will try a number of times to perform autosync with a
** 0.5 second sleep between attempts. The number of attempts is determined
** by the "autosync-tries" setting, which defaults to 1.
**
** Return zero on success and non-zero on a failure. If failure occurs
** and doPrompt flag is true, ask the user if they want to continue, and
** if they answer "yes" then return zero in spite of the failure.
*/
int autosync_loop(int flags, int doPrompt){
int n = 0;
int rc = 0;
int nTries = db_get_int("autosync-tries", 1);
if( (flags & (SYNC_PUSH|SYNC_PULL))==(SYNC_PUSH|SYNC_PULL)
&& db_get_boolean("uv-sync",0)
){
flags |= SYNC_UNVERSIONED;
}
while( (n==0 || n<nTries) && (rc=autosync(flags)) ){
if( rc ){
|