Module: sip-router
Branch: mariusbucur/dmq
Commit: cba881c53ae0904ee296974805e81edbdf81cd6d
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=cba881c…
Author: Marius Bucur <marius(a)marius-bucur.ro>
Committer: Marius Bucur <marius(a)marius-bucur.ro>
Date: Sat Jun 4 10:20:20 2011 +0300
minor serialization changes
---
modules_k/htable/ht_serialize.c | 4 ++--
modules_k/htable/ht_var.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules_k/htable/ht_serialize.c b/modules_k/htable/ht_serialize.c
index 7f47223..8540d29 100644
--- a/modules_k/htable/ht_serialize.c
+++ b/modules_k/htable/ht_serialize.c
@@ -44,7 +44,7 @@ int serialize_ht_pair(str* key, pv_value_t* val, str* htname, str* s) {
}
encoded_key.len = len;
- s->len = snprintf(s->s, s->len, "%d|%d|%.*s|%.*s|%.*s",
val->flags, val->ri, STR_FMT(&encoded_htname), STR_FMT(&encoded_key),
STR_FMT(&encoded_val));
+ s->len = snprintf(s->s, s->len, "%d %d %.*s %.*s %.*s",
val->flags, val->ri, STR_FMT(&encoded_htname), STR_FMT(&encoded_key),
STR_FMT(&encoded_val));
if(s->len < 0) {
LM_ERR("cannot serialize data - probably an small buffer\n");
goto error;
@@ -78,7 +78,7 @@ int deserialize_ht_pair(str* key, pv_value_t* val, str* htname, str*
src) {
encoded_key.s = pkg_malloc(src->len);
memset(encoded_key.s, 0, src->len);
- sscanf(src->s, "%d|%d|%s|%s|%s", &val->flags, &val->ri,
encoded_htname.s, encoded_key.s, encoded_val.s);
+ sscanf(src->s, "%d %d %s %s %s", &val->flags, &val->ri,
encoded_htname.s, encoded_key.s, encoded_val.s);
encoded_htname.len = strlen(encoded_htname.s);
encoded_key.len = strlen(encoded_key.s);
encoded_val.len = strlen(encoded_val.s);
diff --git a/modules_k/htable/ht_var.c b/modules_k/htable/ht_var.c
index 26e0747..e04ad69 100644
--- a/modules_k/htable/ht_var.c
+++ b/modules_k/htable/ht_var.c
@@ -66,7 +66,7 @@ int pv_get_ht_cell(struct sip_msg *msg, pv_param_t *param,
int dmq_ht_set_cell(str* key, pv_value_t* val, str* htname) {
ht_t* ht = ht_get_table(htname);
int_str isval;
- LM_ERR("dmq_ht_set_cell %.*s %p %d\n", STR_FMT(htname), ht, htname->len);
+ LM_ERR("dmq_ht_set_cell [%.*s] (%p) (%d)\n", STR_FMT(htname), ht,
htname->len);
if(ht==NULL) {
LM_ERR("error getting table\n");
return -1;