浏览代码

ims_registrar_pcscf: fixed removal of contacts on de-registration

- the code was there, but I guess some API changes resulted in temporary
commented-out code; this uses the new parameters and seems to fix the
issue.
Dragos Vingarzan 9 年之前
父节点
当前提交
e102306fe7
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      modules/ims_registrar_pcscf/save.c

+ 3 - 3
modules/ims_registrar_pcscf/save.c

@@ -183,9 +183,9 @@ static inline int update_contacts(struct sip_msg *req,struct sip_msg *rpl, udoma
 					LM_DBG("contact already exists and is in state (%d) : [%s]\n",pcontact->reg_state, reg_state_to_string(pcontact->reg_state));
 					LM_DBG("contact already exists and is in state (%d) : [%s]\n",pcontact->reg_state, reg_state_to_string(pcontact->reg_state));
 					if ((expires-local_time_now)<=0) { //remove contact - de-register
 					if ((expires-local_time_now)<=0) { //remove contact - de-register
 						LM_DBG("This is a de-registration for contact <%.*s>\n", c->uri.len, c->uri.s);
 						LM_DBG("This is a de-registration for contact <%.*s>\n", c->uri.len, c->uri.s);
-//						if (ul.delete_pcontact(_d, &c->uri, &ci.received_host, ci.received_port, pcontact) != 0) {
-//							LM_ERR("failed to delete pcscf contact <%.*s>\n", c->uri.len, c->uri.s);
-//						}
+						if (ul.delete_pcontact(_d, pcontact) != 0) {
+							LM_ERR("failed to delete pcscf contact <%.*s>\n", c->uri.len, c->uri.s);
+						}
                                                 //TODO_LATEST replace above
                                                 //TODO_LATEST replace above
 					} else { //update contact
 					} else { //update contact
 						LM_DBG("Updating contact: <%.*s>, old expires: %li, new expires: %i which is in %i seconds\n", c->uri.len, c->uri.s,
 						LM_DBG("Updating contact: <%.*s>, old expires: %li, new expires: %i which is in %i seconds\n", c->uri.len, c->uri.s,