From 3d88101a5fae061e1d2e11650d25a0a9f84883ab Mon Sep 17 00:00:00 2001 From: bagyenda <> Date: Tue, 21 Feb 2006 15:40:30 +0000 Subject: [PATCH] Minor fix for uaprof handling in mmsproxy -- improved fallback --- mbuni/mmsc/mmsproxy.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/mbuni/mmsc/mmsproxy.c b/mbuni/mmsc/mmsproxy.c index a63c458..6c923b8 100644 --- a/mbuni/mmsc/mmsproxy.c +++ b/mbuni/mmsc/mmsproxy.c @@ -139,7 +139,15 @@ int main(int argc, char *argv[]) octstr_strip_nonalphanums(profile_url); h.prof = mms_get_ua_profile(octstr_get_cstr(profile_url)); octstr_destroy(profile_url); - } else + } + + /* In case profile_url is missing or we haven't cached it yet, + * use a fall back strategy and construct profile from HTTP headers. + * XXX: Do we need to make mms_get_ua_profile() + * construct profile even if it's not cached? + */ + + if (!h.prof) h.prof = mms_make_ua_profile(h.headers); /* Get the sender address. */