summaryrefslogtreecommitdiffstats
path: root/runtime/msg.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2013-10-23 15:50:42 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2013-10-23 15:50:42 +0200
commite93ebb79dbb0d6715a297be2ddbf721ef2fda2bb (patch)
tree3b72e8b362a07609b17753d3b80ee4bb487b03e1 /runtime/msg.c
parentbd9c5d6648be43495181c96ea309ef3309b8e694 (diff)
downloadrsyslog-e93ebb79dbb0d6715a297be2ddbf721ef2fda2bb.tar.gz
rsyslog-e93ebb79dbb0d6715a297be2ddbf721ef2fda2bb.tar.bz2
rsyslog-e93ebb79dbb0d6715a297be2ddbf721ef2fda2bb.zip
refactor: remove now no-longer needed functions
Diffstat (limited to 'runtime/msg.c')
-rw-r--r--runtime/msg.c72
1 files changed, 0 insertions, 72 deletions
diff --git a/runtime/msg.c b/runtime/msg.c
index a0215ab6..5224ccea 100644
--- a/runtime/msg.c
+++ b/runtime/msg.c
@@ -3679,78 +3679,6 @@ uchar *MsgGetProp(msg_t *pMsg, struct templateEntry *pTpe,
}
-/* The function returns a json variable suitable for use with RainerScript.
- * Note: caller must free the returned string.
- * Note that we need to do a lot of conversions between es_str_t and cstr -- this will go away once
- * we have moved larger parts of rsyslog to es_str_t. Acceptable for the moment, especially as we intend
- * to rewrite the script engine as well!
- * rgerhards, 2010-12-03
- */
-static es_str_t*
-msgGetJSONVarNew(msg_t *pMsg, struct json_object *jroot, char *name)
-{
- uchar *leaf;
- char *val;
- es_str_t *estr = NULL;
- struct json_object *json, *parent;
-
- ISOBJ_TYPE_assert(pMsg, msg);
-
- if(jroot == NULL) {
- estr = es_newStr(1);
- goto done;
- }
- leaf = jsonPathGetLeaf((uchar*)name, strlen(name));
- if(jsonPathFindParent(jroot, (uchar*)name, leaf, &parent, 1) != RS_RET_OK) {
- estr = es_newStr(1);
- goto done;
- }
- json = json_object_object_get(parent, (char*)leaf);
- val = (char*)json_object_get_string(json);
- estr = es_newStrFromCStr(val, strlen(val));
-done:
- return estr;
-}
-
-es_str_t*
-msgGetCEEVarNew(msg_t *pMsg, char *name)
-{
- return msgGetJSONVarNew(pMsg, pMsg->json, name);
-}
-
-es_str_t*
-msgGetLocalVarNew(msg_t *pMsg, char *name)
-{
- return msgGetJSONVarNew(pMsg, pMsg->localvars, name);
-}
-
-/* Return an es_str_t for given message property.
- */
-es_str_t*
-msgGetMsgVarNew(msg_t *pThis, uchar *name)
-{
- rs_size_t propLen;
- uchar *pszProp = NULL;
- unsigned short bMustBeFreed = 0;
- msgPropDescr_t mProp;
- es_str_t *estr;
-
- ISOBJ_TYPE_assert(pThis, msg);
-
- /* always call MsgGetProp() without a template specifier */
- /* TODO: optimize propNameToID() call -- rgerhards, 2009-06-26 */
-#warning remove strlen() ?
- msgPropDescrFill(&mProp, name, ustrlen(name));
- pszProp = (uchar*) MsgGetProp(pThis, NULL, &mProp, &propLen, &bMustBeFreed, NULL);
-
- estr = es_newStrFromCStr((char*)pszProp, propLen);
- if(bMustBeFreed)
- free(pszProp);
-
- return estr;
-}
-
-
/* This function can be used as a generic way to set properties.
* We have to handle a lot of legacy, so our return value is not always
* 100% correct (called functions do not always provide one, should