summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-06-02 12:22:00 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-06-02 12:22:00 +0200
commit05ba5fc29fb13857b6fbb7c8f3c22489da3e73cf (patch)
tree2f62532cf874ad5bde53bcbf9998d9950040e086 /runtime
parent14d1209640e3554c4284eab136f9932cfc441126 (diff)
downloadrsyslog-05ba5fc29fb13857b6fbb7c8f3c22489da3e73cf.tar.gz
rsyslog-05ba5fc29fb13857b6fbb7c8f3c22489da3e73cf.tar.xz
rsyslog-05ba5fc29fb13857b6fbb7c8f3c22489da3e73cf.zip
slightly extended strms_sess interface
Diffstat (limited to 'runtime')
-rw-r--r--runtime/strms_sess.c10
-rw-r--r--runtime/strms_sess.h1
2 files changed, 10 insertions, 1 deletions
diff --git a/runtime/strms_sess.c b/runtime/strms_sess.c
index 20920430..0aeebe03 100644
--- a/runtime/strms_sess.c
+++ b/runtime/strms_sess.c
@@ -64,7 +64,7 @@ ENDobjConstruct(strms_sess)
/* ConstructionFinalizer
*/
static rsRetVal
-strms_sessConstructFinalize(strms_sess_t __attribute__((unused)) *pThis)
+strms_sessConstructFinalize(strms_sess_t *pThis)
{
DEFiRet;
ISOBJ_TYPE_assert(pThis, strms_sess);
@@ -170,6 +170,13 @@ SetUsrP(strms_sess_t *pThis, void *pUsr)
}
+static void *
+GetUsrP(strms_sess_t *pThis)
+{
+ return pThis->pUsr;
+}
+
+
/* Closes a STRM session
* No attention is paid to the return code
* of close, so potential-double closes are not detected.
@@ -248,6 +255,7 @@ CODESTARTobjQueryInterface(strms_sess)
pIf->DataRcvd = DataRcvd;
pIf->SetUsrP = SetUsrP;
+ pIf->GetUsrP = GetUsrP;
pIf->SetStrmsrv = SetStrmsrv;
pIf->SetLstnInfo = SetLstnInfo;
pIf->SetHost = SetHost;
diff --git a/runtime/strms_sess.h b/runtime/strms_sess.h
index c8cb5349..6483c0c3 100644
--- a/runtime/strms_sess.h
+++ b/runtime/strms_sess.h
@@ -54,6 +54,7 @@ BEGINinterface(strms_sess) /* name must also be changed in ENDinterface macro! *
rsRetVal (*SetStrmsrv)(strms_sess_t *pThis, struct strmsrv_s *pSrv);
rsRetVal (*SetLstnInfo)(strms_sess_t *pThis, strmLstnPortList_t *pLstnInfo);
rsRetVal (*SetUsrP)(strms_sess_t*, void*);
+ void* (*GetUsrP)(strms_sess_t*);
rsRetVal (*SetHost)(strms_sess_t *pThis, uchar*);
rsRetVal (*SetHostIP)(strms_sess_t *pThis, uchar*);
rsRetVal (*SetStrm)(strms_sess_t *pThis, netstrm_t*);