Mercurial > pidgin.yaz
comparison libpurple/protocols/msn/oim.c @ 23535:fd276936164f
Make errors when sending OIM's more visible.
Also, msn_session_report_user doesn't modify msg, so it can be const.
References #5379.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Fri, 20 Jun 2008 05:36:18 +0000 |
parents | 20da64b2e104 |
children | 8fd6a97b9c67 |
comparison
equal
deleted
inserted
replaced
23534:20da64b2e104 | 23535:fd276936164f |
---|---|
331 /*repost the send*/ | 331 /*repost the send*/ |
332 purple_debug_info("MSNP14","resending OIM: %s\n", msg->oim_msg); | 332 purple_debug_info("MSNP14","resending OIM: %s\n", msg->oim_msg); |
333 g_queue_push_head(oim->send_queue, msg); | 333 g_queue_push_head(oim->send_queue, msg); |
334 msn_oim_send_msg(oim); | 334 msn_oim_send_msg(oim); |
335 } | 335 } |
336 } else { | |
337 /* Report the error */ | |
338 const char *str_reason; | |
339 | |
340 if (g_str_equal(faultcode_str, "q0:SystemUnavailable")) { | |
341 str_reason = _("Message was not sent because the system is " | |
342 "unavailable. This normally happens when the " | |
343 "user is blocked or does not exist."); | |
344 | |
345 } else if (g_str_equal(faultcode_str, "q0:SenderThrottleLimitExceeded")) { | |
346 str_reason = _("Message was not sent because messages " | |
347 "are being sent too quickly."); | |
348 | |
349 } else if (g_str_equal(faultcode_str, "q0:InvalidContent")) { | |
350 str_reason = _("Message was not sent because an unknown " | |
351 "encoding error occured."); | |
352 | |
353 } else { | |
354 str_reason = _("Message was not sent because an unknown " | |
355 "error occured."); | |
356 } | |
357 | |
358 msn_session_report_user(oim->session, msg->to_member, | |
359 str_reason, PURPLE_MESSAGE_ERROR); | |
360 msn_session_report_user(oim->session, msg->to_member, | |
361 msg->oim_msg, PURPLE_MESSAGE_RAW); | |
336 } | 362 } |
337 | 363 |
338 g_free(faultcode_str); | 364 g_free(faultcode_str); |
339 } | 365 } |
340 } | 366 } |