本文整理汇总了C++中usrloc_api_t::remove_dialog_data_from_contact方法的典型用法代码示例。如果您正苦于以下问题:C++ usrloc_api_t::remove_dialog_data_from_contact方法的具体用法?C++ usrloc_api_t::remove_dialog_data_from_contact怎么用?C++ usrloc_api_t::remove_dialog_data_from_contact使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类usrloc_api_t
的用法示例。
在下文中一共展示了usrloc_api_t::remove_dialog_data_from_contact方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: remove_dlg_data_from_contact
void remove_dlg_data_from_contact(struct dlg_cell *dlg, int type, struct dlg_cb_params *_params) {
struct impu_data *impu_data;
impurecord_t* implicit_impurecord = 0;
struct ucontact* ucontact;
str callid = {0, 0};
str path = {0, 0};
LM_DBG("dialog [%p] terminated, lets remove dlg data from contact\n", dlg);
if(_params && _params->param){
impu_data = (struct impu_data*)*_params->param;
if (!impu_data) {
LM_ERR("IMPU data object is NULL...... aborting\n");
return;
}
LM_DBG("IMPU data is present, contact: <%.*s> identity <%.*s>", impu_data->contact.len, impu_data->contact.s, impu_data->identity.len, impu_data->identity.s);
LM_DBG("IMPU data domain <%.*s>", impu_data->d->name->len, impu_data->d->name->s);
ul.lock_udomain(impu_data->d, &impu_data->identity);
if (ul.get_impurecord(impu_data->d, &impu_data->identity, &implicit_impurecord) != 0) {
LM_DBG("usrloc does not have imprecord for implicity IMPU, ignore\n");
}else {
if (ul.get_ucontact(implicit_impurecord, &impu_data->contact, &callid, &path, 0/*cseq*/, &ucontact) != 0) { //contact does not exist
LM_DBG("This contact: <%.*s> is not in usrloc, ignore - NOTE: You need S-CSCF usrloc set to match_mode CONTACT_PORT_IP_ONLY\n", impu_data->contact.len, impu_data->contact.s);
} else {//contact exists so add dialog data to it
ul.remove_dialog_data_from_contact(ucontact, dlg->h_entry, dlg->h_id);
}
}
ul.unlock_udomain(impu_data->d, &impu_data->identity);
free_impu_data(impu_data);
}
}