Beispiel #1
0
/*!
 * \brief Remove contact in memory from the list and delete it
 * \param _r record this contact belongs to
 * \param _c deleted contact
 */
void mem_delete_ucontact(impurecord_t* _r, ucontact_t* _c) {
    
    struct contact_dialog_data *dialog_data;
    //tear down dialogs in dialog data list
    for (dialog_data = _c->first_dialog_data; dialog_data;) {
        dlgb.lookup_terminate_dlg(dialog_data->h_entry, dialog_data->h_id, NULL );
        dialog_data = dialog_data->next;
    }
    
    mem_remove_ucontact(_r, _c);
    if_update_stat(_r->slot, _r->slot->d->contacts, -1);
    free_ucontact(_c);
}
Beispiel #2
0
/*!
 * \brief Remove contact in memory from the list and delete it
 * \param _r record this contact belongs to
 * \param _c deleted contact
 */
void mem_delete_ucontact(ucontact_t* _c) {

    struct contact_dialog_data *dialog_data;
    //tear down dialogs in dialog data list
    LM_DBG("Checking if dialog_data is there and needs to be torn down\n");
    if(_c->first_dialog_data == 0) {
        LM_DBG("first dialog is 0!\n");
    } else {
        LM_DBG("first dialog is not 0\n");
    }
    for (dialog_data = _c->first_dialog_data; dialog_data;) {
        LM_DBG("Going to tear down dialog with info h_entry [%d] h_id [%d]\n", dialog_data->h_entry, dialog_data->h_id);
        dlgb.lookup_terminate_dlg(dialog_data->h_entry, dialog_data->h_id, NULL);
        dialog_data = dialog_data->next;
    }

    mem_remove_ucontact(_c);
    free_ucontact(_c);
}
Beispiel #3
0
/*
 * Remove contact from the list and delete
 */
void mem_delete_ucontact(urecord_t* _r, ucontact_t* _c)
{
	mem_remove_ucontact(_r, _c);
	free_ucontact(_c);
}
Beispiel #4
0
/*!
 * \brief Remove contact in memory from the list and delete it
 * \param _r record this contact belongs to
 * \param _c deleted contact
 */
void mem_delete_ucontact(urecord_t* _r, ucontact_t* _c)
{
	mem_remove_ucontact(_r, _c);
	if_update_stat( _r->slot, _r->slot->d->contacts, -1);
	free_ucontact(_c);
}