From 05ba5fc29fb13857b6fbb7c8f3c22489da3e73cf Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Tue, 2 Jun 2009 12:22:00 +0200 Subject: slightly extended strms_sess interface --- runtime/strms_sess.c | 10 +++++++++- runtime/strms_sess.h | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) 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*); -- cgit