No subject


Wed Jun 9 03:17:30 CEST 2010


rpc_t and c (I assume c is here the rpc context) in a structure, since
every rpc "callback" already gets both of them as parameters.


Andrei

>=20
> Thanks,
> Ovidiu Sas
>=20
> On Sat, Jun 26, 2010 at 9:13 AM, Ovidiu Sas <osas at voipembedded.com> wro=
te:
> > Hello all,
> >
> > I need to pass the rpc printf params between two modules via a
> > callback functions.
> > The current implementation allows passing a pointer during the
> > callback call and I would like to reuse the existing callback pointer
> > to pass a everything that I need through it.
> > I would like to define a new structure for rpc and pass a pointer to
> > that structure during the callback call:
> >
> > diff --git a/rpc.h b/rpc.h
> > index 1434146..ff66b5a 100644
> > --- a/rpc.h
> > +++ b/rpc.h
> > @@ -88,6 +88,10 @@ typedef struct rpc_delayed_ctx{
> > =A0 =A0/* more private data might follow */
> > =A0} rpc_delayed_ctx_t;
> >
> > +typedef struct rpc_cb_ctx {
> > + =A0 rpc_t *rpc;
> > + =A0 void *c;
> > +} rpc_cb_ctx_t;
> >
> > =A0/*
> > =A0* RPC Function Prototype
> >
> >
> > This will allow printing mixed info from different modules, in my
> > particular case, printing qos context info along with dialog context
> > info (modules_k: dialog and qos).
> > Since I'm not familiar with the rpc interface, please advice if this
> > is the right way of doing it or if there is another better
> > alternative.
> >
> >
> > Regards,
> > Ovidiu Sas
> >
>=20
> _______________________________________________
> sr-dev mailing list
> sr-dev at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev



More information about the sr-dev mailing list