[sr-dev] git:master: core: rpc - adding rpc_cb_ctx_t

Ovidiu Sas osas at voipembedded.com
Tue Jun 29 16:02:59 CEST 2010


Module: sip-router
Branch: master
Commit: e5e03e8589851f3b115f8aca7dea40a34c597416
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e5e03e8589851f3b115f8aca7dea40a34c597416

Author: Ovidiu Sas <osas at voipembedded.com>
Committer: Ovidiu Sas <osas at voipembedded.com>
Date:   Tue Jun 29 09:53:05 2010 -0400

core: rpc - adding rpc_cb_ctx_t

 - rpc_cb_ctx_t is a convenient way of packing an rpc
    callback (rpc_function_t) parameters and it's not
    used/needed by the rpc api/interface.

---

 rpc.h |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/rpc.h b/rpc.h
index 1434146..addc8c8 100644
--- a/rpc.h
+++ b/rpc.h
@@ -95,6 +95,18 @@ typedef struct rpc_delayed_ctx{
 
 typedef void (*rpc_function_t)(rpc_t* rpc, void* ctx);
 
+/*
+ * RPC callback context.
+ *
+ * Defines a convenient way of packing an rpc callback
+ * (rpc_function_t) parameters and it's not used/needed
+ * by the rpc api/interface.
+ */
+typedef struct rpc_cb_ctx {
+	rpc_t *rpc;
+	void *c;
+} rpc_cb_ctx_t;
+
 
 /*
  * Remote Procedure Call Export




More information about the sr-dev mailing list