[sr-dev] rpc: inter module rpc printf callback structure
Ovidiu Sas
osas at voipembedded.com
Mon Jun 28 23:55:17 CEST 2010
So ... are there any objections of defining the rpc_cb_ctx_t typedef
inside rpc.h?
Thanks,
Ovidiu Sas
On Sat, Jun 26, 2010 at 9:13 AM, Ovidiu Sas <osas at voipembedded.com> wrote:
> 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{
> /* more private data might follow */
> } rpc_delayed_ctx_t;
>
> +typedef struct rpc_cb_ctx {
> + rpc_t *rpc;
> + void *c;
> +} rpc_cb_ctx_t;
>
> /*
> * 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
>
More information about the sr-dev
mailing list