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. */