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

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


Module: kamailio
Branch: master
Commit: a9ffc2a1f7514a7bd4ff0e294e3bcb50d3a2bf07
URL: https://github.com/kamailio/kamailio/commit/a9ffc2a1f7514a7bd4ff0e294e3bcb50d3a2bf07

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

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

- reported by Sebastian Damm, GH #948

---

Modified: src/modules/htable/ht_db.c

---

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

---

diff --git a/src/modules/htable/ht_db.c b/src/modules/htable/ht_db.c
index 6f61e76..fd692ca 100644
--- a/src/modules/htable/ht_db.c
+++ b/src/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