From 8256a105cf47b07fc032de7828f0b069d23779e6 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Tue, 1 Jul 2008 15:17:33 +0200 Subject: some more changes to cater for new LogError() interface --- plugins/omlibdbi/omlibdbi.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'plugins/omlibdbi') diff --git a/plugins/omlibdbi/omlibdbi.c b/plugins/omlibdbi/omlibdbi.c index 661aee6f..6f130f54 100644 --- a/plugins/omlibdbi/omlibdbi.c +++ b/plugins/omlibdbi/omlibdbi.c @@ -133,7 +133,7 @@ reportDBError(instanceData *pData, int bSilent) /* output log message */ errno = 0; if(pData->conn == NULL) { - errmsg.LogError(NO_ERRCODE, "unknown DB error occured - could not obtain connection handle"); + errmsg.LogError(0, NO_ERRCODE, "unknown DB error occured - could not obtain connection handle"); } else { /* we can ask dbi for the error description... */ uDBErrno = dbi_conn_error(pData->conn, &pszDbiErr); snprintf(errMsg, sizeof(errMsg)/sizeof(char), "db error (%d): %s\n", uDBErrno, pszDbiErr); @@ -141,7 +141,7 @@ reportDBError(instanceData *pData, int bSilent) dbgprintf("libdbi, DBError(silent): %s\n", errMsg); else { pData->uLastDBErrno = uDBErrno; - errmsg.LogError(NO_ERRCODE, "%s", errMsg); + errmsg.LogError(0, NO_ERRCODE, "%s", errMsg); } } @@ -167,10 +167,10 @@ static rsRetVal initConn(instanceData *pData, int bSilent) iDrvrsLoaded = dbi_initialize((char*) dbiDrvrDir); # endif if(iDrvrsLoaded == 0) { - errmsg.LogError(NO_ERRCODE, "libdbi error: libdbi or libdbi drivers not present on this system - suspending."); + errmsg.LogError(0, RS_RET_SUSPENDED, "libdbi error: libdbi or libdbi drivers not present on this system - suspending."); ABORT_FINALIZE(RS_RET_SUSPENDED); } else if(iDrvrsLoaded < 0) { - errmsg.LogError(NO_ERRCODE, "libdbi error: libdbi could not be initialized - suspending."); + errmsg.LogError(0, RS_RET_SUSPENDED, "libdbi error: libdbi could not be initialized - suspending."); ABORT_FINALIZE(RS_RET_SUSPENDED); } bDbiInitialized = 1; /* we are done for the rest of our existence... */ @@ -182,7 +182,7 @@ static rsRetVal initConn(instanceData *pData, int bSilent) pData->conn = dbi_conn_new((char*)pData->drvrName); # endif if(pData->conn == NULL) { - errmsg.LogError(NO_ERRCODE, "can not initialize libdbi connection"); + errmsg.LogError(0, RS_RET_SUSPENDED, "can not initialize libdbi connection"); iRet = RS_RET_SUSPENDED; } else { /* we could get the handle, now on with work... */ /* Connect to database */ @@ -272,7 +272,7 @@ CODE_STD_STRING_REQUESTparseSelectorAct(1) /* no create the instance based on what we currently have */ if(drvrName == NULL) { - errmsg.LogError(NO_ERRCODE, "omlibdbi: no db driver name given - action can not be created"); + errmsg.LogError(0, RS_RET_NO_DRIVERNAME, "omlibdbi: no db driver name given - action can not be created"); ABORT_FINALIZE(RS_RET_NO_DRIVERNAME); } -- cgit