From 51476c67be10e787680b11cbaf4200b8e0487a59 Mon Sep 17 00:00:00 2001 From: pier11 Date: Fri, 5 Mar 2010 10:22:44 +0000 Subject: [PATCH] ft: user notification if content blocked by server For the embedded FT in the INVITE message. Otherwise no notification was presented to user, and FT dialog was left in the waiting state. more info: bug #2954938 http://sourceforge.net/tracker/index.php?func=detail&aid=2954938&group_id=194563&atid=949931 --- src/core/sipe.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/core/sipe.c b/src/core/sipe.c index f3e93733..eb8548be 100644 --- a/src/core/sipe.c +++ b/src/core/sipe.c @@ -4334,6 +4334,15 @@ process_invite_response(struct sipe_account_data *sip, struct sipmsg *msg, struc g_strfreev(parts); } + /* cancel file transfer as rejected by server */ + if (msg->response == 606 && /* Not acceptable all. */ + warning == 309 && /* Message contents not allowed by policy */ + message && g_str_has_prefix(message->content_type, "text/x-msmsgsinvite")) + { + GSList *parsed_body = sipe_ft_parse_msg_body(message->body); + sipe_ft_incoming_cancel(sip->gc->account, parsed_body); + sipe_utils_nameval_free(parsed_body); + } if ((pbuddy = purple_find_buddy(sip->account, with))) { alias = purple_buddy_get_alias(pbuddy); -- 2.11.4.GIT