pidgin/pidgin

Clear conversation typing source ID in callback
release-2.x.y
2021-11-05, Mohammed Sadiq
ee34beb053a0
Parents d9392fea597e
Children 930e4fb71321
Clear conversation typing source ID in callback

Since the callback is run only once, the source ID should be
set to 0 so that the source ID won t be an invalid value.

This avoids a GLib critical on removing the invalid Source ID

Testing Done:
Build and run pidgin and verified that the GLib warning has gone in logs

Reviewed at https://reviews.imfreedom.org/r/1123/
--- a/libpurple/conversation.c Thu Oct 14 22:07:02 2021 -0500
+++ b/libpurple/conversation.c Fri Nov 05 03:20:58 2021 -0500
@@ -102,8 +102,8 @@
im = PURPLE_CONV_IM(c);
+ im->typing_timeout = 0;
purple_conv_im_set_typing_state(im, PURPLE_NOT_TYPING);
- purple_conv_im_stop_typing_timeout(im);
return FALSE;
}
@@ -113,10 +113,14 @@
{
PurpleConversation *conv = (PurpleConversation *)data;
PurpleConnection *gc;
+ PurpleConvIm *im;
const char *name;
g_return_val_if_fail(conv != NULL, FALSE);
+ im = PURPLE_CONV_IM(conv);
+
+ im->send_typed_timeout = 0;
gc = purple_conversation_get_gc(conv);
name = purple_conversation_get_name(conv);