Hi,
In function update_dialog_dbinfo (see dlg_db_handler.c), the dlg_id is not set
before issuing the UPDATE statement. The type is set to DB_BIGINT using the
VAL_TYPE macro, but the value is not set.
} else if (cell->flags & DLG_FLAG_VP_CHANGED) {
VAL_TYPE(values) = DB_BIGINT;
VAL_TYPE(values+20) = DB_INT;
VAL_TYPE(values+21) = DB_INT;
VAL_TYPE(values+18) = VAL_TYPE(values+19) = DB_STR;
/* lock the entry */
entry = (d_table->entries)[cell->h_entry];
dlg_lock( d_table, &entry);
/* THIS LINE SHOULD BE ADDED */
SET_BIGINT_VALUE(values, (((long long)cell->h_entry << 32) |
cell->h_id));
set_final_update_cols(values+18, cell, 0);
CON_PS_REFERENCE(dialog_db_handle) = &my_ps_update_vp;
if((dialog_dbf.update(dialog_db_handle, (insert_keys), 0,
(values), (insert_keys+18),
(values+18), 1, 4)) !=0){
LM_ERR("could not update database info\n");
goto error;
}
run_dlg_callbacks( DLGCB_SAVED, cell, 0, DLG_DIR_NONE, 0);
cell->flags &= ~DLG_FLAG_VP_CHANGED;
}
The issue will only affect users that have set db_mode to DB_REALTIME.
Regards,
Mickael
---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/issues/310___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel