[sr-dev] git:4.4:bd8ca757: htable: use custom column name for order by in db load

Daniel-Constantin Mierla miconda at gmail.com
Wed Jan 25 14:49:18 CET 2017


Module: kamailio
Branch: 4.4
Commit: bd8ca7573c3b840846f346a97de927fec2d04d6b
URL: https://github.com/kamailio/kamailio/commit/bd8ca7573c3b840846f346a97de927fec2d04d6b

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2017-01-25T14:48:36+01:00

htable: use custom column name for order by in db load

- reported by Sebastian Damm, GH #948

(cherry picked from commit a9ffc2a1f7514a7bd4ff0e294e3bcb50d3a2bf07)

---

Modified: modules/htable/ht_db.c

---

Diff:  https://github.com/kamailio/kamailio/commit/bd8ca7573c3b840846f346a97de927fec2d04d6b.diff
Patch: https://github.com/kamailio/kamailio/commit/bd8ca7573c3b840846f346a97de927fec2d04d6b.patch

---

diff --git a/modules/htable/ht_db.c b/modules/htable/ht_db.c
index e1ab7da..d5a5a54 100644
--- a/modules/htable/ht_db.c
+++ b/modules/htable/ht_db.c
@@ -204,6 +204,7 @@ int ht_db_load_table(ht_t *ht, str *dbtable, int mode)
 		return -1;
 	}
 	if(ht->ncols>0) {
+		db_ord = &ht->scols[0];
 		for(c=0; c<ht->ncols; c++) {
 			db_cols[c] = &ht->scols[c];
 		}




More information about the sr-dev mailing list