THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
A new Flyspray task has been opened. Details are below.
User who did this - Savolainen Dmitri (snen)
Attached to Project - sip-router
Summary - sqlops sql_pvquery() error
Task Type - Bug Report
Category - Module
Status - Unconfirmed
Assigned To -
Operating System - All
Severity - Medium
Priority - Normal
Reported Version - Development
Due in Version - Undecided
Due Date - Undecided
Details - sqlops sql_pvquery() error: if multiple rows are returned, when using (x)avp.
avp[0],avp[1]... are equal and contain first returned item
possible patch
<code>
index aa5cfc3..fc17f83 100644
--- a/modules/sqlops/sql_api.c
+++ b/modules/sqlops/sql_api.c
@@ -600,7 +600,7 @@ int sql_do_pvquery(struct sip_msg *msg, sql_con_t *con, pv_elem_t *query,
LM_ERR("Missing pv spec for column %d\n", j+1);
goto error;
}
- if (db_val2pv_spec(msg, &RES_ROWS(db_res)[0].values[j], &pv->sname) != 0) {
+ if (db_val2pv_spec(msg, &RES_ROWS(db_res)[i].values[j], &pv->sname) != 0) {
LM_ERR("Failed to convert value for column %.*s\n",
RES_NAMES(db_res)[j]->len, RES_NAMES(db_res)[j]->s);
goto error;
</code>
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=487
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.