diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2007-07-30 10:12:22 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2007-07-30 10:12:22 +0000 |
commit | 6808a7e2f187760187edbd6aefe3513e2e5bb862 (patch) | |
tree | 36bf98d51bad76ea7056fdfe136f8202a6c653f4 /objomsr.c | |
parent | d2061ff6cb52925162254455f85eeb9ae92bb78b (diff) | |
download | rsyslog-6808a7e2f187760187edbd6aefe3513e2e5bb862.tar.gz rsyslog-6808a7e2f187760187edbd6aefe3513e2e5bb862.tar.xz rsyslog-6808a7e2f187760187edbd6aefe3513e2e5bb862.zip |
- added cfsysline objects - initial set of functions
- fixed bug in OMSRcreate() - always returned SR_RET_OK
Diffstat (limited to 'objomsr.c')
-rw-r--r-- | objomsr.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -90,10 +90,11 @@ rsRetVal OMSRconstruct(omodStringRequest_t **ppThis, int iNumEntries) abort_it: *ppThis = pThis; - return RS_RET_OK; + return iRet; } -/* set a template name and option to the object. Index must be given. +/* set a template name and option to the object. Index must be given. The pTplName must be + * pointing to memory that can be freed. If in doubt, the caller must strdup() the value. */ rsRetVal OMSRsetEntry(omodStringRequest_t *pThis, int iEntry, uchar *pTplName, int iTplOpts) { @@ -103,7 +104,7 @@ rsRetVal OMSRsetEntry(omodStringRequest_t *pThis, int iEntry, uchar *pTplName, i if(pThis->ppTplName[iEntry] != NULL) free(pThis->ppTplName[iEntry]); - pThis->ppTplName[iEntry] = pTplName; /* TODO: do we need to copy? */ + pThis->ppTplName[iEntry] = pTplName; pThis->piTplOpts[iEntry] = iTplOpts; return RS_RET_OK; |