Differences From:
File
src/xfer.c
part of check-in
[a15122ff2d]
- Fix a bug in autosync commit - cleanup the onremote temp table after use.
by
drh on
2007-09-26 13:49:54.
[view]
To:
File
src/xfer.c
part of check-in
[2b51dbe02b]
- If you "sync" against a server for which you do not have push permission,
you get an error message but it still does the pull.
by
drh on
2007-09-26 19:46:37.
[view]
@@ -516,14 +516,18 @@
}
isPull = 1;
}else{
if( !g.okWrite ){
- cgi_reset_content();
- @ error not\sauthorized\sto\swrite
- nErr++;
- break;
- }
- isPush = 1;
+ if( !isPull ){
+ cgi_reset_content();
+ @ error not\sauthorized\sto\swrite
+ nErr++;
+ }else{
+ @ message pull\sonly\s-\snot\sauthorized\sto\spush
+ }
+ }else{
+ isPush = 1;
+ }
}
}else
/* clone
@@ -830,11 +834,21 @@
if( blob_eq(&xfer.aToken[0], "cookie") && xfer.nToken==2 ){
db_set("cookie", blob_str(&xfer.aToken[1]));
}else
+ /* message MESSAGE
+ **
+ ** Print a message. Similar to "error" but does not stop processing
+ */
+ if( blob_eq(&xfer.aToken[0],"message") && xfer.nToken==2 ){
+ char *zMsg = blob_terminate(&xfer.aToken[1]);
+ defossilize(zMsg);
+ printf("Server says: %s\n", zMsg);
+ }else
+
/* error MESSAGE
**
- ** Report an error
+ ** Report an error and abandon the sync session
*/
if( blob_eq(&xfer.aToken[0],"error") && xfer.nToken==2 ){
char *zMsg = blob_terminate(&xfer.aToken[1]);
defossilize(zMsg);