summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2014-07-22 15:55:40 +0200
committerPatrick Ohly <patrick.ohly@intel.com>2014-07-22 15:55:40 +0200
commit15e9d9d06d0ec879526451cf085addfdb4204c86 (patch)
tree169690205c1ba08e6d753a0e699ee9b3fad765da
parentee3d0b73c5e4b4025f5bfb8347179a6440393387 (diff)
binfile: avoid error logging of LOCERR_AGAIN
Item operations returning LOCERR_AGAIN do not need to be logged as error. This will trigger logging elsewhere, so don't log it at all in the binfile layer.
-rwxr-xr-xsrc/sysync/binfileimplds.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/sysync/binfileimplds.cpp b/src/sysync/binfileimplds.cpp
index f51a54d..314ccc7 100755
--- a/src/sysync/binfileimplds.cpp
+++ b/src/sysync/binfileimplds.cpp
@@ -1976,7 +1976,9 @@ bool TBinfileImplDS::implProcessItem(
case sop_add :
// add record
if ((sta=createItem(aItemP,newid,receiveOnly))!=LOCERR_OK) {
- PDEBUGPRINTFX(DBG_ERROR,("cannot create record in database (sta=%hd)",sta));
+ if (sta != LOCERR_AGAIN) {
+ PDEBUGPRINTFX(DBG_ERROR,("cannot create record in database (sta=%hd)",sta));
+ }
// check special "needs merge" case
if (sta==DB_Conflict) {
// DB has detected item conflicts with data already stored in the database and
@@ -2029,7 +2031,9 @@ bool TBinfileImplDS::implProcessItem(
case sop_replace :
// change record
if ((sta=updateItemByID(localid,aItemP))!=LOCERR_OK) {
- PDEBUGPRINTFX(DBG_ERROR,("cannot update record in database (sta=%hd)",sta));
+ if (sta != LOCERR_AGAIN) {
+ PDEBUGPRINTFX(DBG_ERROR,("cannot update record in database (sta=%hd)",sta));
+ }
statuscode=sta;
goto error; // check errors
}
@@ -2039,7 +2043,9 @@ bool TBinfileImplDS::implProcessItem(
case sop_delete :
// delete record
if ((sta=deleteItemByID(localid))!=LOCERR_OK) {
- PDEBUGPRINTFX(DBG_ERROR,("cannot delete record in database (sta=%hd)",sta));
+ if (sta != LOCERR_AGAIN) {
+ PDEBUGPRINTFX(DBG_ERROR,("cannot delete record in database (sta=%hd)",sta));
+ }
statuscode=sta; // not found
goto error; // check errors
}
@@ -2220,7 +2226,9 @@ bool TBinfileImplDS::implProcessItem(
error:
// report OS specific error codes as item text back to the originator
ok=false;
- PDEBUGPRINTFX(DBG_ERROR,("Database Error --> SyncML status %ld%s",(long)statuscode,lastDBErrorText().c_str()));
+ if (statuscode != LOCERR_AGAIN) {
+ PDEBUGPRINTFX(DBG_ERROR,("Database Error --> SyncML status %ld%s",(long)statuscode,lastDBErrorText().c_str()));
+ }
//aStatusCommand.addItemString(lastDBErrorDbgText().c_str());
done:
delete augmentedItemP;