From e7b5faee07d814d76f2be0b160b28b58f51e1762 Mon Sep 17 00:00:00 2001 From: bagyenda <> Date: Wed, 27 Jul 2011 14:24:11 +0000 Subject: [PATCH] Fixed uaprof timestamp bug --- mbuni/ChangeLog | 2 ++ mbuni/mmlib/mms_mm7soap.c | 10 +++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/mbuni/ChangeLog b/mbuni/ChangeLog index 2d426d8..ebc4c83 100644 --- a/mbuni/ChangeLog +++ b/mbuni/ChangeLog @@ -1,3 +1,5 @@ +2011-07-27 P. A. Bagyenda + * Fixed UAProf timestamp bug 2011-05-30 P. A. Bagyenda * Fixed mm5 parameters usage in mmsc_cfg.c 2011-05-05 P. A. Bagyenda diff --git a/mbuni/mmlib/mms_mm7soap.c b/mbuni/mmlib/mms_mm7soap.c index 1b0199a..3973175 100644 --- a/mbuni/mmlib/mms_mm7soap.c +++ b/mbuni/mmlib/mms_mm7soap.c @@ -844,7 +844,8 @@ int mm7_get_envelope(MSoapMsg_t *m, } if (uaprof) { Octstr *s = http_header_value(m->envelope, octstr_imm("UACapabilities")); - if (uaprof_tstamp) *uaprof_tstamp = -1; + if (uaprof_tstamp) + *uaprof_tstamp = -1; if (s) { char *s1 = octstr_get_cstr(s); char *s2 = strrchr(s1, ','); @@ -854,6 +855,13 @@ int mm7_get_envelope(MSoapMsg_t *m, octstr_delete(s, s2-s1, octstr_len(s)); } *uaprof = s; + } + + if (uaprof_tstamp && *uaprof_tstamp <= 0) { /* Use Date field */ + Octstr *s = http_header_value(m->envelope, octstr_imm("Date")); + if (s && uaprof_tstamp) + *uaprof_tstamp = date_parse_http(s); + octstr_destroy(s); } } return 0;