[sr-dev] git:master: tm: advertise child rpc-sip mode when using event_route[tm: local-request]

Daniel-Constantin Mierla miconda at gmail.com
Thu Sep 29 10:26:57 CEST 2011


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Thu Sep 29 09:33:01 2011 +0200

tm: advertise child rpc-sip mode when using event_route[tm:local-request]

- the event route can be executed for MI/RPC commands that send
  requests, thus there are sip routing specific functions that work when
  child init for sip workers is executed for that process
- example, calling acc_db_request() requires db connection to be open

---

 modules/tm/tm.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/modules/tm/tm.c b/modules/tm/tm.c
index d9b8bbf..5e06470 100644
--- a/modules/tm/tm.c
+++ b/modules/tm/tm.c
@@ -842,6 +842,8 @@ static int mod_init(void)
 	goto_on_local_req=route_lookup(&event_rt, "tm:local-request");
 	if (goto_on_local_req>=0 && event_rt.rlist[goto_on_local_req]==0)
 		goto_on_local_req=-1; /* disable */
+	if (goto_on_local_req>=0)
+		set_child_rpc_sip_mode();
 #endif /* WITH_EVENT_LOCAL_REQUEST */
 	if (goto_on_sl_reply && onreply_rt.rlist[goto_on_sl_reply]==0)
 		WARN("empty/non existing on_sl_reply route\n");




More information about the sr-dev mailing list