fix for oa core changes

sayer/1.4-spce2.6
Stefan Sayer 15 years ago committed by Stefan Sayer
parent 7ae3ca4d4d
commit 11dd8bcff0

@ -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

@ -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

Loading…
Cancel
Save