[sr-dev] git:master:beba4579: presence: more use of variable for received_time column instead of static value

Daniel-Constantin Mierla miconda at gmail.com
Thu Mar 26 21:20:06 CET 2015


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2015-03-26T21:19:48+01:00

presence: more use of variable for received_time column instead of static value

---

Modified: modules/presence/presentity.c

---

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

---

diff --git a/modules/presence/presentity.c b/modules/presence/presentity.c
index 58d56cd..024a3ca 100644
--- a/modules/presence/presentity.c
+++ b/modules/presence/presentity.c
@@ -1022,6 +1022,7 @@ char* get_sphere(str* pres_uri)
 	int n_query_cols = 0;
 	struct sip_uri uri;
 	str body;
+	static str query_str;
 
 
 	if(!sphere_enable)
@@ -1087,7 +1088,7 @@ char* get_sphere(str* pres_uri)
 		return NULL;
 	}
 
-	static str query_str = str_init("received_time");
+	query_str = str_received_time_col;
 	if (pa_dbf.query (pa_db, query_cols, 0, query_vals,
 		 result_cols, n_query_cols, n_result_cols, &query_str ,  &result) < 0) 
 	{




More information about the sr-dev mailing list