summaryrefslogtreecommitdiffstats
path: root/objomsr.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2007-07-30 10:12:22 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2007-07-30 10:12:22 +0000
commit6808a7e2f187760187edbd6aefe3513e2e5bb862 (patch)
tree36bf98d51bad76ea7056fdfe136f8202a6c653f4 /objomsr.c
parentd2061ff6cb52925162254455f85eeb9ae92bb78b (diff)
downloadrsyslog-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.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/objomsr.c b/objomsr.c
index e6e737cb..3d3264b5 100644
--- a/objomsr.c
+++ b/objomsr.c
@@ -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;