diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-25 19:30:13 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-25 19:30:13 +0000 |
commit | 15eb2b29c923c705788c2114067498c2cb90f82e (patch) | |
tree | 2db0333ba3160f2c60ec40ac196ace6d37f91d7c /plugins/omsnmp | |
parent | 87f0e9b5f91407418a43a06f39831febfbd4e3ad (diff) | |
download | rsyslog-15eb2b29c923c705788c2114067498c2cb90f82e.tar.gz rsyslog-15eb2b29c923c705788c2114067498c2cb90f82e.tar.xz rsyslog-15eb2b29c923c705788c2114067498c2cb90f82e.zip |
created a work-around for plugin interface issue
Diffstat (limited to 'plugins/omsnmp')
-rw-r--r-- | plugins/omsnmp/omsnmp.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/omsnmp/omsnmp.c b/plugins/omsnmp/omsnmp.c index 58b89c6a..0328d851 100644 --- a/plugins/omsnmp/omsnmp.c +++ b/plugins/omsnmp/omsnmp.c @@ -113,23 +113,23 @@ CODE_STD_STRING_REQUESTparseSelectorAct(0) } else { ABORT_FINALIZE(RS_RET_CONFLINE_UNPROCESSED); } -dbgprintf("0\n"); /* ok, if we reach this point, we have something for us */ if((iRet = createInstance(&pData)) != RS_RET_OK) goto finalize_it; -dbgprintf("1\n"); - - ABORT_FINALIZE( RS_RET_CONFLINE_UNPROCESSED );// RS_RET_PARAM_ERROR ); -dbgprintf("2\n"); - /* Failsave */ - if (pszTarget == NULL) - ABORT_FINALIZE( RS_RET_CONFLINE_UNPROCESSED );// RS_RET_PARAM_ERROR ); + if (pszTarget == NULL) { + /* due to a problem in the framework, we can not return an error code + * right now, so we need to use a (useless) default. + */ + /* TODO: re-enable when rsyslogd supports it: ABORT_FINALIZE( RS_RET_PARAM_ERROR ); */ + strncpy( (char*) pData->szTarget, "127.0.0.1", sizeof( pData->szTarget -1 ) ); + } else { /* Copy Target */ strncpy( (char*) pData->szTarget, (char*) pszTarget, sizeof( pData->szTarget -1 ) ); + } CODE_STD_FINALIZERparseSelectorAct ENDparseSelectorAct |