1
0
Fork 0

Fixed uaprof timestamp bug

This commit is contained in:
bagyenda 2011-07-27 14:24:11 +00:00
parent 11c50d6217
commit e7b5faee07
2 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,5 @@
2011-07-27 P. A. Bagyenda <bagyenda@dsmagic.com>
* Fixed UAProf timestamp bug
2011-05-30 P. A. Bagyenda <bagyenda@dsmagic.com>
* Fixed mm5 parameters usage in mmsc_cfg.c
2011-05-05 P. A. Bagyenda <bagyenda@dsmagic.com>

View File

@ -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, ',');
@ -855,6 +856,13 @@ int mm7_get_envelope(MSoapMsg_t *m,
}
*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;
}