diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2012-04-23 14:51:34 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2012-04-23 14:51:34 +0200 |
commit | 2eea95f626badb5a93ff7eca97cc68e5d2f3940a (patch) | |
tree | c7467c2ace398cda5d39e0f6fbda07e38fdc8e5c /plugins | |
parent | 7d8ac48a4a214da917f7455f24b4c292c3e6d015 (diff) | |
parent | 9b06a4c26422b0a8727e1b3c6cc7141226186105 (diff) | |
download | rsyslog-2eea95f626badb5a93ff7eca97cc68e5d2f3940a.tar.gz rsyslog-2eea95f626badb5a93ff7eca97cc68e5d2f3940a.tar.xz rsyslog-2eea95f626badb5a93ff7eca97cc68e5d2f3940a.zip |
Merge branch 'master' into master-elasticsearch
Conflicts:
plugins/omelasticsearch/omelasticsearch.c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/imdiag/imdiag.c | 3 | ||||
-rw-r--r-- | plugins/imgssapi/imgssapi.c | 2 | ||||
-rw-r--r-- | plugins/imklog/imklog.c | 5 | ||||
-rw-r--r-- | plugins/impstats/impstats.c | 8 | ||||
-rw-r--r-- | plugins/imptcp/imptcp.c | 22 | ||||
-rw-r--r-- | plugins/imtcp/imtcp.c | 10 | ||||
-rw-r--r-- | plugins/imudp/imudp.c | 5 | ||||
-rw-r--r-- | plugins/imuxsock/imuxsock.c | 25 | ||||
-rw-r--r-- | plugins/omelasticsearch/omelasticsearch.c | 1 |
9 files changed, 56 insertions, 25 deletions
diff --git a/plugins/imdiag/imdiag.c b/plugins/imdiag/imdiag.c index 48573853..6ea615a1 100644 --- a/plugins/imdiag/imdiag.c +++ b/plugins/imdiag/imdiag.c @@ -381,7 +381,8 @@ static rsRetVal addTCPListener(void __attribute__((unused)) *pVal, uchar *pNewVa /* initialized, now add socket */ CHKiRet(tcpsrv.SetInputName(pOurTcpsrv, pszInputName == NULL ? UCHAR_CONSTANT("imdiag") : pszInputName)); - tcpsrv.configureTCPListen(pOurTcpsrv, pNewVal); + /* we support octect-cuunted frame (constant 1 below) */ + tcpsrv.configureTCPListen(pOurTcpsrv, pNewVal, 1); finalize_it: if(iRet != RS_RET_OK) { diff --git a/plugins/imgssapi/imgssapi.c b/plugins/imgssapi/imgssapi.c index 9668d1ac..4e3a70ab 100644 --- a/plugins/imgssapi/imgssapi.c +++ b/plugins/imgssapi/imgssapi.c @@ -340,7 +340,7 @@ addGSSListener(void __attribute__((unused)) *pVal, uchar *pNewVal) CHKiRet(tcpsrv.SetCBOnRegularClose(pOurTcpsrv, onRegularClose)); CHKiRet(tcpsrv.SetCBOnErrClose(pOurTcpsrv, onErrClose)); CHKiRet(tcpsrv.SetInputName(pOurTcpsrv, UCHAR_CONSTANT("imgssapi"))); - tcpsrv.configureTCPListen(pOurTcpsrv, pNewVal); + tcpsrv.configureTCPListen(pOurTcpsrv, pNewVal, 1); CHKiRet(tcpsrv.ConstructFinalize(pOurTcpsrv)); } diff --git a/plugins/imklog/imklog.c b/plugins/imklog/imklog.c index 71cb9ac6..90b424f3 100644 --- a/plugins/imklog/imklog.c +++ b/plugins/imklog/imklog.c @@ -47,6 +47,7 @@ #include <stdarg.h> #include <ctype.h> #include <stdlib.h> +#include <sys/socket.h> #include "dirty.h" #include "cfsysline.h" @@ -55,6 +56,7 @@ #include "module-template.h" #include "datetime.h" #include "imklog.h" +#include "net.h" #include "glbl.h" #include "prop.h" #include "unicode-helper.h" @@ -68,6 +70,7 @@ DEF_IMOD_STATIC_DATA DEFobjCurrIf(datetime) DEFobjCurrIf(glbl) DEFobjCurrIf(prop) +DEFobjCurrIf(net) /* config settings */ typedef struct configSettings_s { @@ -359,6 +362,7 @@ CODESTARTmodExit /* release objects we used */ objRelease(glbl, CORE_COMPONENT); + objRelease(net, CORE_COMPONENT); objRelease(datetime, CORE_COMPONENT); objRelease(prop, CORE_COMPONENT); ENDmodExit @@ -394,6 +398,7 @@ CODEmodInit_QueryRegCFSLineHdlr CHKiRet(objUse(datetime, CORE_COMPONENT)); CHKiRet(objUse(glbl, CORE_COMPONENT)); CHKiRet(objUse(prop, CORE_COMPONENT)); + CHKiRet(objUse(net, CORE_COMPONENT)); /* we need to create the inputName property (only once during our lifetime) */ CHKiRet(prop.CreateStringProp(&pInputName, UCHAR_CONSTANT("imklog"), sizeof("imklog") - 1)); diff --git a/plugins/impstats/impstats.c b/plugins/impstats/impstats.c index dfca25da..4fec8e70 100644 --- a/plugins/impstats/impstats.c +++ b/plugins/impstats/impstats.c @@ -75,7 +75,6 @@ static modConfData_t *runModConf = NULL;/* modConf ptr to use for the current lo static configSettings_t cs; static prop_t *pInputName = NULL; -static prop_t *pLocalHostIP = NULL; BEGINisCompatibleWithFeature CODESTARTisCompatibleWithFeature @@ -106,7 +105,7 @@ doSubmitMsg(uchar *line) MsgSetRawMsgWOSize(pMsg, (char*)line); MsgSetHOSTNAME(pMsg, glbl.GetLocalHostName(), ustrlen(glbl.GetLocalHostName())); MsgSetRcvFrom(pMsg, glbl.GetLocalHostNameProp()); - MsgSetRcvFromIP(pMsg, pLocalHostIP); + MsgSetRcvFromIP(pMsg, glbl.GetLocalHostIP()); MsgSetMSGoffs(pMsg, 0); MsgSetTAG(pMsg, UCHAR_CONSTANT("rsyslogd-pstats:"), sizeof("rsyslogd-pstats:") - 1); pMsg->iFacility = runModConf->iFacility; @@ -221,7 +220,6 @@ ENDafterRun BEGINmodExit CODESTARTmodExit prop.Destruct(&pInputName); - prop.Destruct(&pLocalHostIP); /* release objects we used */ objRelease(glbl, CORE_COMPONENT); objRelease(prop, CORE_COMPONENT); @@ -266,10 +264,6 @@ CODEmodInit_QueryRegCFSLineHdlr CHKiRet(prop.Construct(&pInputName)); CHKiRet(prop.SetString(pInputName, UCHAR_CONSTANT("impstats"), sizeof("impstats") - 1)); CHKiRet(prop.ConstructFinalize(pInputName)); - - CHKiRet(prop.Construct(&pLocalHostIP)); - CHKiRet(prop.SetString(pLocalHostIP, UCHAR_CONSTANT("127.0.0.1"), sizeof("127.0.0.1") - 1)); - CHKiRet(prop.ConstructFinalize(pLocalHostIP)); ENDmodInit /* vi:set ai: */ diff --git a/plugins/imptcp/imptcp.c b/plugins/imptcp/imptcp.c index ec6836c1..ba323a94 100644 --- a/plugins/imptcp/imptcp.c +++ b/plugins/imptcp/imptcp.c @@ -97,6 +97,7 @@ typedef struct configSettings_s { int iKeepAliveProbes; int iKeepAliveTime; int bEmitMsgOnClose; /* emit an informational message on close by remote peer */ + int bSuppOctetFram; /* support octet-counted framing? */ int iAddtlFrameDelim; /* addtl frame delimiter, e.g. for netscreen, default none */ uchar *pszInputName; /* value for inputname property, NULL is OK and handled by core engine */ uchar *lstnIP; /* which IP we should listen on? */ @@ -111,6 +112,7 @@ struct instanceConf_s { int iKeepAliveProbes; int iKeepAliveTime; int bEmitMsgOnClose; + int bSuppOctetFram; /* support octet-counted framing? */ int iAddtlFrameDelim; uchar *pszBindPort; /* port to bind to */ uchar *pszBindAddr; /* IP to bind socket to */ @@ -157,6 +159,7 @@ struct ptcpsrv_s { pthread_mutex_t mutSessLst; sbool bKeepAlive; /* support keep-alive packets */ sbool bEmitMsgOnClose; + sbool bSuppOctetFram; }; /* the ptcp session object. Describes a single active session. @@ -171,6 +174,7 @@ struct ptcpsess_s { //--- from tcps_sess.h int iMsg; /* index of next char to store in msg */ int bAtStrtOfFram; /* are we at the very beginning of a new frame? */ + sbool bSuppOctetFram; /**< copy from listener, to speed up access */ enum { eAtStrtFram, eInOctetCnt, @@ -191,6 +195,7 @@ struct ptcplstn_s { ptcpsrv_t *pSrv; /* our server */ ptcplstn_t *prev, *next; int sock; + sbool bSuppOctetFram; epolld_t *epd; statsobj_t *stats; /* listener stats */ STATSCOUNTER_DEF(ctrSubmit, mutCtrSubmit) @@ -325,7 +330,9 @@ startupSrv(ptcpsrv_t *pSrv) continue; } #endif - } + } else { + isIPv6 = 0; + } if(setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (char *) &on, sizeof(on)) < 0 ) { DBGPRINTF("error %d setting tcp socket option\n", errno); close(sock); @@ -665,7 +672,7 @@ processDataRcvd(ptcpsess_t *pThis, char c, struct syslogTime *stTime, time_t ttG DEFiRet; if(pThis->inputState == eAtStrtFram) { - if(isdigit((int) c)) { + if(pThis->bSuppOctetFram && isdigit((int) c)) { pThis->inputState = eInOctetCnt; pThis->iOctetsRemain = 0; pThis->eFraming = TCP_FRAMING_OCTET_COUNTING; @@ -805,6 +812,7 @@ initConfigSettings(void) { cs.bEmitMsgOnClose = 0; cs.wrkrMax = 2; + cs.bSuppOctetFram = 1; cs.iAddtlFrameDelim = TCPSRV_NO_ADDTL_DELIMITER; cs.pszInputName = NULL; cs.pszBindRuleset = NULL; @@ -821,7 +829,7 @@ addEPollSock(epolld_type_t typ, void *ptr, int sock, epolld_t **pEpd) DEFiRet; epolld_t *epd = NULL; - CHKmalloc(epd = malloc(sizeof(epolld_t))); + CHKmalloc(epd = calloc(sizeof(epolld_t), 1)); epd->typ = typ; epd->ptr = ptr; *pEpd = epd; @@ -883,6 +891,7 @@ addLstn(ptcpsrv_t *pSrv, int sock, int isIPv6) CHKmalloc(pLstn = malloc(sizeof(ptcplstn_t))); pLstn->pSrv = pSrv; + pLstn->bSuppOctetFram = pSrv->bSuppOctetFram; pLstn->sock = sock; /* support statistics gathering */ CHKiRet(statsobj.Construct(&(pLstn->stats))); @@ -891,6 +900,7 @@ addLstn(ptcpsrv_t *pSrv, int sock, int isIPv6) isIPv6 ? "IPv6" : "IPv4"); statname[sizeof(statname)-1] = '\0'; /* just to be on the save side... */ CHKiRet(statsobj.SetName(pLstn->stats, statname)); + STATSCOUNTER_INIT(pLstn->ctrSubmit, pLstn->mutCtrSubmit); CHKiRet(statsobj.AddCounter(pLstn->stats, UCHAR_CONSTANT("submitted"), ctrType_IntCtr, &(pLstn->ctrSubmit))); CHKiRet(statsobj.ConstructFinalize(pLstn->stats)); @@ -922,6 +932,7 @@ addSess(ptcplstn_t *pLstn, int sock, prop_t *peerName, prop_t *peerIP) CHKmalloc(pSess->pMsg = malloc(iMaxLine * sizeof(uchar))); pSess->pLstn = pLstn; pSess->sock = sock; + pSess->bSuppOctetFram = pLstn->bSuppOctetFram; pSess->inputState = eAtStrtFram; pSess->iMsg = 0; pSess->bAtStrtOfFram = 1; @@ -1013,6 +1024,7 @@ static rsRetVal addInstance(void __attribute__((unused)) *pVal, uchar *pNewVal) CHKmalloc(inst->pszInputName = ustrdup(cs.pszInputName)); } inst->pBindRuleset = NULL; + inst->bSuppOctetFram = cs.bSuppOctetFram; inst->bKeepAlive = cs.bKeepAlive; inst->iKeepAliveIntvl = cs.iKeepAliveTime; inst->iKeepAliveProbes = cs.iKeepAliveProbes; @@ -1045,6 +1057,7 @@ addListner(modConfData_t __attribute__((unused)) *modConf, instanceConf_t *inst) pthread_mutex_init(&pSrv->mutSessLst, NULL); pSrv->pSess = NULL; pSrv->pLstn = NULL; + pSrv->bSuppOctetFram = inst->bSuppOctetFram; pSrv->bKeepAlive = inst->bKeepAlive; pSrv->iKeepAliveIntvl = inst->iKeepAliveTime; pSrv->iKeepAliveProbes = inst->iKeepAliveProbes; @@ -1530,6 +1543,7 @@ resetConfigVariables(uchar __attribute__((unused)) *pp, void __attribute__((unus cs.iKeepAliveProbes = 0; cs.iKeepAliveTime = 0; cs.iKeepAliveIntvl = 0; + cs.bSuppOctetFram = 1; cs.iAddtlFrameDelim = TCPSRV_NO_ADDTL_DELIMITER; free(cs.pszInputName); cs.pszInputName = NULL; @@ -1586,6 +1600,8 @@ CODEmodInit_QueryRegCFSLineHdlr NULL, &cs.iKeepAliveTime, STD_LOADABLE_MODULE_ID)); CHKiRet(omsdRegCFSLineHdlr(UCHAR_CONSTANT("inputptcpserverkeepalive_intvl"), 0, eCmdHdlrInt, NULL, &cs.iKeepAliveIntvl, STD_LOADABLE_MODULE_ID)); + CHKiRet(omsdRegCFSLineHdlr(UCHAR_CONSTANT("inputptcpserversupportoctetcountedframing"), 0, eCmdHdlrBinary, + NULL, &cs.bSuppOctetFram, STD_LOADABLE_MODULE_ID)); CHKiRet(omsdRegCFSLineHdlr(UCHAR_CONSTANT("inputptcpservernotifyonconnectionclose"), 0, eCmdHdlrBinary, NULL, &cs.bEmitMsgOnClose, STD_LOADABLE_MODULE_ID)); CHKiRet(omsdRegCFSLineHdlr(UCHAR_CONSTANT("inputptcpserveraddtlframedelimiter"), 0, eCmdHdlrInt, diff --git a/plugins/imtcp/imtcp.c b/plugins/imtcp/imtcp.c index 15f9fa72..33404fee 100644 --- a/plugins/imtcp/imtcp.c +++ b/plugins/imtcp/imtcp.c @@ -88,6 +88,7 @@ static permittedPeers_t *pPermPeersRoot = NULL; static struct configSettings_s { int iTCPSessMax; int iTCPLstnMax; + int bSuppOctetFram; int iStrmDrvrMode; int bKeepAlive; int bEmitMsgOnClose; @@ -104,6 +105,7 @@ struct instanceConf_s { uchar *pszBindRuleset; /* name of ruleset to bind to */ ruleset_t *pBindRuleset; /* ruleset to bind listener to (use system default if unspecified) */ uchar *pszInputName; /* value for inputname property, NULL is OK and handled by core engine */ + int bSuppOctetFram; struct instanceConf_s *next; }; @@ -115,6 +117,7 @@ struct modConfData_s { int iTCPLstnMax; /* max number of sessions */ int iStrmDrvrMode; /* mode for stream driver, driver-dependent (0 mostly means plain tcp) */ int iAddtlFrameDelim; /* addtl frame delimiter, e.g. for netscreen, default none */ + int bSuppOctetFram; sbool bDisableLFDelim; /* disable standard LF delimiter */ sbool bUseFlowControl; /* use flow control, what means indicate ourselfs a "light delayable" */ sbool bKeepAlive; @@ -222,6 +225,7 @@ static rsRetVal addInstance(void __attribute__((unused)) *pVal, uchar *pNewVal) } else { CHKmalloc(inst->pszInputName = ustrdup(cs.pszInputName)); } + inst->bSuppOctetFram = cs.bSuppOctetFram; inst->next = NULL; /* node created, let's add to config */ @@ -274,7 +278,7 @@ addListner(modConfData_t *modConf, instanceConf_t *inst) CHKiRet(tcpsrv.SetRuleset(pOurTcpsrv, inst->pBindRuleset)); CHKiRet(tcpsrv.SetInputName(pOurTcpsrv, inst->pszInputName == NULL ? UCHAR_CONSTANT("imtcp") : inst->pszInputName)); - tcpsrv.configureTCPListen(pOurTcpsrv, inst->pszBindPort); + tcpsrv.configureTCPListen(pOurTcpsrv, inst->pszBindPort, inst->bSuppOctetFram); finalize_it: if(iRet != RS_RET_OK) { @@ -301,6 +305,7 @@ CODESTARTendCnfLoad pModConf->iTCPLstnMax = cs.iTCPLstnMax; pModConf->iStrmDrvrMode = cs.iStrmDrvrMode; pModConf->bEmitMsgOnClose = cs.bEmitMsgOnClose; + pModConf->bSuppOctetFram = cs.bSuppOctetFram; pModConf->iAddtlFrameDelim = cs.iAddtlFrameDelim; pModConf->bDisableLFDelim = cs.bDisableLFDelim; pModConf->bUseFlowControl = cs.bUseFlowControl; @@ -417,6 +422,7 @@ resetConfigVariables(uchar __attribute__((unused)) *pp, void __attribute__((unus { cs.iTCPSessMax = 200; cs.iTCPLstnMax = 20; + cs.bSuppOctetFram = 1; cs.iStrmDrvrMode = 0; cs.bUseFlowControl = 0; cs.bKeepAlive = 0; @@ -459,6 +465,8 @@ CODEmodInit_QueryRegCFSLineHdlr addInstance, NULL, STD_LOADABLE_MODULE_ID)); CHKiRet(omsdRegCFSLineHdlr(UCHAR_CONSTANT("inputtcpserverkeepalive"), 0, eCmdHdlrBinary, NULL, &cs.bKeepAlive, STD_LOADABLE_MODULE_ID)); + CHKiRet(omsdRegCFSLineHdlr(UCHAR_CONSTANT("inputtcpserversupportoctetcountedframing"), 0, eCmdHdlrBinary, + NULL, &cs.bSuppOctetFram, STD_LOADABLE_MODULE_ID)); CHKiRet(omsdRegCFSLineHdlr(UCHAR_CONSTANT("inputtcpmaxsessions"), 0, eCmdHdlrInt, NULL, &cs.iTCPSessMax, STD_LOADABLE_MODULE_ID)); CHKiRet(omsdRegCFSLineHdlr(UCHAR_CONSTANT("inputtcpmaxlisteners"), 0, eCmdHdlrInt, diff --git a/plugins/imudp/imudp.c b/plugins/imudp/imudp.c index 48cb2774..6abeab07 100644 --- a/plugins/imudp/imudp.c +++ b/plugins/imudp/imudp.c @@ -256,6 +256,7 @@ addListner(instanceConf_t *inst) snprintf((char*)statname, sizeof(statname), "imudp(%s:%s)", bindName, port); statname[sizeof(statname)-1] = '\0'; /* just to be on the save side... */ CHKiRet(statsobj.SetName(newlcnfinfo->stats, statname)); + STATSCOUNTER_INIT(newlcnfinfo->ctrSubmit, newlcnfinfo->mutCtrSubmit); CHKiRet(statsobj.AddCounter(newlcnfinfo->stats, UCHAR_CONSTANT("submitted"), ctrType_IntCtr, &(newlcnfinfo->ctrSubmit))); CHKiRet(statsobj.ConstructFinalize(newlcnfinfo->stats)); @@ -266,9 +267,11 @@ addListner(instanceConf_t *inst) lcnfRoot = newlcnfinfo; if(lcnfLast == NULL) lcnfLast = newlcnfinfo; - else + else { lcnfLast->next = newlcnfinfo; + lcnfLast = newlcnfinfo; #endif //>>>>>>> ef34821a2737799f48c3032b9616418e4f7fa34f + } } } diff --git a/plugins/imuxsock/imuxsock.c b/plugins/imuxsock/imuxsock.c index 193cbb33..2d26e652 100644 --- a/plugins/imuxsock/imuxsock.c +++ b/plugins/imuxsock/imuxsock.c @@ -94,6 +94,7 @@ DEF_IMOD_STATIC_DATA DEFobjCurrIf(errmsg) DEFobjCurrIf(glbl) DEFobjCurrIf(prop) +DEFobjCurrIf(net) DEFobjCurrIf(parser) DEFobjCurrIf(datetime) DEFobjCurrIf(statsobj) @@ -330,6 +331,7 @@ static rsRetVal addInstance(void __attribute__((unused)) *pVal, uchar *pNewVal) CHKmalloc(inst = MALLOC(sizeof(instanceConf_t))); inst->sockName = pNewVal; inst->ratelimitInterval = cs.ratelimitInterval; + inst->pLogHostName = cs.pLogHostName; inst->ratelimitBurst = cs.ratelimitBurst; inst->ratelimitSeverity = cs.ratelimitSeverity; inst->bUseFlowCtl = cs.bUseFlowCtl; @@ -376,14 +378,13 @@ addListner(instanceConf_t *inst) } else { listeners[nfd].bParseHost = 0; } - CHKiRet(prop.Construct(&(listeners[nfd].hostName))); if(inst->pLogHostName == NULL) { - CHKiRet(prop.SetString(listeners[nfd].hostName, glbl.GetLocalHostName(), - ustrlen(glbl.GetLocalHostName()))); + listeners[nfd].hostName = NULL; } else { + CHKiRet(prop.Construct(&(listeners[nfd].hostName))); CHKiRet(prop.SetString(listeners[nfd].hostName, inst->pLogHostName, ustrlen(inst->pLogHostName))); + CHKiRet(prop.ConstructFinalize(listeners[nfd].hostName)); } - CHKiRet(prop.ConstructFinalize(listeners[nfd].hostName)); if(inst->ratelimitInterval > 0) { if((listeners[nfd].ht = create_hashtable(100, hash_from_key_fn, key_equals_fn, NULL)) == NULL) { /* in this case, we simply turn off rate-limiting */ @@ -866,7 +867,7 @@ SubmitMsg(uchar *pRcv, int lenRcv, lstn_t *pLstn, struct ucred *cred, struct tim pMsg->msgFlags = pLstn->flags; } - MsgSetRcvFrom(pMsg, pLstn->hostName); + MsgSetRcvFrom(pMsg, pLstn->hostName == NULL ? glbl.GetLocalHostNameProp() : pLstn->hostName); CHKiRet(MsgSetRcvFromIP(pMsg, pLocalHostIP)); CHKiRet(submitMsg(pMsg)); @@ -1256,6 +1257,7 @@ CODESTARTmodInit CODEmodInit_QueryRegCFSLineHdlr CHKiRet(objUse(errmsg, CORE_COMPONENT)); CHKiRet(objUse(glbl, CORE_COMPONENT)); + CHKiRet(objUse(net, CORE_COMPONENT)); CHKiRet(objUse(prop, CORE_COMPONENT)); CHKiRet(objUse(statsobj, CORE_COMPONENT)); CHKiRet(objUse(datetime, CORE_COMPONENT)); @@ -1272,6 +1274,13 @@ CODEmodInit_QueryRegCFSLineHdlr CHKiRet(prop.SetString(pInputName, UCHAR_CONSTANT("imuxsock"), sizeof("imuxsock") - 1)); CHKiRet(prop.ConstructFinalize(pInputName)); + /* right now, glbl does not permit per-instance IP address notation. As long as this + * is the case, it is OK to query the HostIP once here at this location. HOWEVER, the + * whole concept is not 100% clean and needs to be addressed on a higher layer. + * TODO / rgerhards, 2012-04-11 + */ + pLocalHostIP = glbl.GetLocalHostIP(); + /* init system log socket settings */ listeners[0].flags = IGNDATE; listeners[0].sockName = UCHAR_CONSTANT(_PATH_LOG); @@ -1290,15 +1299,11 @@ CODEmodInit_QueryRegCFSLineHdlr listeners[i].fd = -1; } + /* now init listen socket zero, the local log socket */ CHKiRet(prop.Construct(&pLocalHostIP)); CHKiRet(prop.SetString(pLocalHostIP, UCHAR_CONSTANT("127.0.0.1"), sizeof("127.0.0.1") - 1)); CHKiRet(prop.ConstructFinalize(pLocalHostIP)); - /* now init listen socket zero, the local log socket */ - CHKiRet(prop.Construct(&(listeners[0].hostName))); - CHKiRet(prop.SetString(listeners[0].hostName, glbl.GetLocalHostName(), ustrlen(glbl.GetLocalHostName()))); - CHKiRet(prop.ConstructFinalize(listeners[0].hostName)); - /* register config file handlers */ CHKiRet(omsdRegCFSLineHdlr((uchar *)"omitlocallogging", 0, eCmdHdlrBinary, NULL, &cs.bOmitLocalLogging, STD_LOADABLE_MODULE_ID)); diff --git a/plugins/omelasticsearch/omelasticsearch.c b/plugins/omelasticsearch/omelasticsearch.c index 0b2e0bf1..79a24ffe 100644 --- a/plugins/omelasticsearch/omelasticsearch.c +++ b/plugins/omelasticsearch/omelasticsearch.c @@ -29,7 +29,6 @@ #include <stdlib.h> #include <string.h> #include <curl/curl.h> -//#include <curl/types.h> #include <curl/easy.h> #include <assert.h> #include <signal.h> |