summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2012-10-19 09:07:32 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2012-10-19 09:07:32 +0200
commitd36407c7947ba119c971427e1528122509bf895f (patch)
treee41fcc42a0720c79b872bdbc6e7c2cecb2782580
parent1e4ca690525ec4a547ad0fe3efbcd6d059dda15d (diff)
downloadrsyslog-d36407c7947ba119c971427e1528122509bf895f.tar.gz
rsyslog-d36407c7947ba119c971427e1528122509bf895f.tar.xz
rsyslog-d36407c7947ba119c971427e1528122509bf895f.zip
fix epoll-enabled code to use correct data member for pointers
-rw-r--r--plugins/imudp/imudp.c4
-rw-r--r--runtime/nsdpoll_ptcp.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/plugins/imudp/imudp.c b/plugins/imudp/imudp.c
index 70c21bb9..91127f89 100644
--- a/plugins/imudp/imudp.c
+++ b/plugins/imudp/imudp.c
@@ -484,7 +484,7 @@ rsRetVal rcvMainLoop(thrdInfo_t *pThrd)
for(lstn = lcnfRoot ; lstn != NULL ; lstn = lstn->next) {
if(lstn->sock != -1) {
udpEPollEvt[i].events = EPOLLIN | EPOLLET;
- udpEPollEvt[i].data.u64 = (long long unsigned) lstn;
+ udpEPollEvt[i].data.ptr = lstn;
if(epoll_ctl(efd, EPOLL_CTL_ADD, lstn->sock, &(udpEPollEvt[i])) < 0) {
rs_strerror_r(errno, errStr, sizeof(errStr));
errmsg.LogError(errno, NO_ERRCODE, "epoll_ctrl failed on fd %d with %s\n",
@@ -503,7 +503,7 @@ rsRetVal rcvMainLoop(thrdInfo_t *pThrd)
break; /* terminate input! */
for(i = 0 ; i < nfds ; ++i) {
- processSocket(pThrd, (struct lstn_s*)currEvt[i].data.u64, &frominetPrev, &bIsPermitted);
+ processSocket(pThrd, currEvt[i].data.ptr, &frominetPrev, &bIsPermitted);
}
}
diff --git a/runtime/nsdpoll_ptcp.c b/runtime/nsdpoll_ptcp.c
index ef9c37a3..51b17ddd 100644
--- a/runtime/nsdpoll_ptcp.c
+++ b/runtime/nsdpoll_ptcp.c
@@ -75,7 +75,7 @@ addEvent(nsdpoll_ptcp_t *pThis, int id, void *pUsr, int mode, nsd_ptcp_t *pSock,
pNew->event.events |= EPOLLIN;
if(mode & NSDPOLL_OUT)
pNew->event.events |= EPOLLOUT;
- pNew->event.data.u64 = (uint64) pNew;
+ pNew->event.data.ptr = pNew;
pNew->pNext = pThis->pRoot;
pThis->pRoot = pNew;
*pEvtLst = pNew;
@@ -231,7 +231,7 @@ Wait(nsdpoll_t *pNsdpoll, int timeout, int *idRdy, void **ppUsr) {
}
/* we got a valid event, so tell the caller... */
- pOurEvt = (nsdpoll_epollevt_lst_t*) event.data.u64;
+ pOurEvt = (nsdpoll_epollevt_lst_t*) event.data.ptr;
*idRdy = pOurEvt->id;
*ppUsr = pOurEvt->pUsr;