Module: sems Branch: master Commit: 6e535e4dea92b1c0f1f6332c4f63133d5df7cd5f URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=6e535e4dea92b1c0f1f6332c4f63133d5df7cd5f
Author: Stefan Sayer <[email protected]> Committer: Stefan Sayer <[email protected]> Date: Fri May 27 14:01:39 2011 +0200 fix for oa core changes --- apps/db_reg_agent/DBRegAgent.cpp | 23 ++++++++++++++++++++--- apps/db_reg_agent/Makefile | 2 +- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/apps/db_reg_agent/DBRegAgent.cpp b/apps/db_reg_agent/DBRegAgent.cpp index 9eeece5..a02b0fc 100644 --- a/apps/db_reg_agent/DBRegAgent.cpp +++ b/apps/db_reg_agent/DBRegAgent.cpp @@ -581,10 +581,24 @@ void DBRegAgent::updateDBRegistration(long subscriber_id, int last_code, void DBRegAgent::onSipReplyEvent(AmSipReplyEvent* ev) { if (!ev) return; - DBG("received SIP reply event for '%s'\n", ev->reply.local_tag.c_str()); + DBG("received SIP reply event for '%s'\n", +#ifdef HAS_OFFER_ANSWER + ev->reply.from_tag.c_str() +#else + ev->reply.local_tag.c_str() +#endif + ); registrations_mut.lock(); - map<string, long>::iterator it=registration_ltags.find(ev->reply.local_tag); + + string local_tag = +#ifdef HAS_OFFER_ANSWER + ev->reply.from_tag; +#else + ev->reply.local_tag; +#endif + + map<string, long>::iterator it=registration_ltags.find(local_tag); if (it!=registration_ltags.end()) { long subscriber_id = it->second; map<long, AmSIPRegistration*>::iterator r_it=registrations.find(subscriber_id); @@ -596,8 +610,11 @@ void DBRegAgent::onSipReplyEvent(AmSipReplyEvent* ev) { } // AmSIPRegistration::RegistrationState state_before = r_it->second->getState(); +#ifdef HAS_OFFER_ANSWER + registration->getDlg()->onRxReply(ev->reply); +#else registration->getDlg()->updateStatus(ev->reply); - +#endif AmSIPRegistration::RegistrationState current_state = registration->getState(); //update registrations set diff --git a/apps/db_reg_agent/Makefile b/apps/db_reg_agent/Makefile index fc93878..bb5b3c1 100644 --- a/apps/db_reg_agent/Makefile +++ b/apps/db_reg_agent/Makefile @@ -1,7 +1,7 @@ plug_in_name = db_reg_agent module_ldflags = -lmysqlpp -module_cflags = -DMOD_NAME=\"$(plug_in_name)\" -I/usr/include/mysql++ -I/usr/include/mysql +module_cflags = -DHAS_OFFER_ANSWER -DMOD_NAME=\"$(plug_in_name)\" -I/usr/include/mysql++ -I/usr/include/mysql COREPATH ?=../../core include $(COREPATH)/plug-in/Makefile.app_module _______________________________________________ Semsdev mailing list [email protected] http://lists.iptel.org/mailman/listinfo/semsdev
