diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2010-04-19 17:13:08 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2010-04-19 17:13:08 +0200 |
commit | d3eb89a5fe1dbcda028c0ab5e6753578716539d7 (patch) | |
tree | 9a6da2266542fb772bc996b6d245403ecdfd126c /plugins | |
parent | 4e511087c413629120315fe5dd26f966ac1ef6fb (diff) | |
parent | 587036bfb03167d86b0a2fbfe998db1a916cabb3 (diff) | |
download | rsyslog-d3eb89a5fe1dbcda028c0ab5e6753578716539d7.tar.gz rsyslog-d3eb89a5fe1dbcda028c0ab5e6753578716539d7.tar.xz rsyslog-d3eb89a5fe1dbcda028c0ab5e6753578716539d7.zip |
Merge branch 'v4-devel' into master
Conflicts:
runtime/msg.h
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/imsolaris/imsolaris.c | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/plugins/imsolaris/imsolaris.c b/plugins/imsolaris/imsolaris.c index a2238a29..e591b875 100644 --- a/plugins/imsolaris/imsolaris.c +++ b/plugins/imsolaris/imsolaris.c @@ -127,7 +127,6 @@ solaris_readLog(int fd) uchar bufRcv[4096+1]; uchar *pRcv = NULL; /* receive buffer */ char errStr[1024]; - uchar fmtBuf[10240]; // TODO: use better solution assert(logfd >= 0); @@ -158,32 +157,21 @@ solaris_readLog(int fd) dbgprintf("imsolaris: getmsg() returns %d\n", ret); dbgprintf("imsolaris: message from log socket: #%d: %s\n", fd, pRcv); if (1) {//iRcvd > 0) { - // TODO: use hdr info! This whole section is a work-around to get - // it going. -#if 0 CHKiRet(msgConstruct(&pMsg)); //MsgSetFlowControlType(pMsg, eFLOWCTL_FULL_DELAY); MsgSetInputName(pMsg, pInputName); MsgSetRawMsg(pMsg, (char*)pRcv, strlen((char*)pRcv)); - MsgSetMSGoffs(pMsg, 0); /* we do not have a header... */ MsgSetHOSTNAME(pMsg, glbl.GetLocalHostName(), ustrlen(glbl.GetLocalHostName())); - //MsgSetTAG(pMsg, pInfo->pszTag, pInfo->lenTag); - //pMsg->iFacility = LOG_FAC(pInfo->iFacility); - //pMsg->iSeverity = LOG_PRI(pInfo->iSeverity); - pMsg->bParseHOSTNAME = 0; + pMsg->iFacility = LOG_FAC(hdr.pri); + pMsg->iSeverity = LOG_PRI(hdr.pri); + //pMsg->bParseHOSTNAME = 0; + pMsg->msgFlags = NEEDS_PARSING | NO_PRI_IN_RAW; CHKiRet(submitMsg(pMsg)); -#else - iRcvd = snprintf((char*)fmtBuf, sizeof(fmtBuf), "<%d>%s", hdr.pri, (char*) pRcv); - parseAndSubmitMessage(glbl.GetLocalHostName(), - (uchar*)"127.0.0.1", fmtBuf, - iRcvd, 0, - 0, pInputName, NULL, 0); -#endif } else if (iRcvd < 0 && errno != EINTR) { int en = errno; rs_strerror_r(en, errStr, sizeof(errStr)); dbgprintf("imsolaris: stream error: %d = %s.\n", errno, errStr); - //errmsg.LogError(en, NO_ERRCODE, "imsolaris: socket error UNIX"); + errmsg.LogError(en, NO_ERRCODE, "imsolaris: stream input error: %s", errStr); } finalize_it: |