pidgin: a32b7088: I'm not comfortable with this being an a...

markdoliner at markdoliner at
Sun Nov 22 19:26:53 EST 2009

Revision: a32b7088cc5f5afb18b147305a3b0b278b7c3dfb
Ancestor: ae8b0acdd9594765179627ac095332c90ca028bc
Author: markdoliner at
Date: 2009-11-23T00:19:33
Branch: im.pidgin.pidgin

Modified files:


I'm not comfortable with this being an assert.  If it fails then Pidgin
crashes.  I don't think a fatal check like this should exist in the init
function of a prpl unless it's dangerous for the application to continue
running.  I can't imagine why that would be the case here.

People also seem concerned about this struct definition:
struct raw_chunk {
    guint8      type;
    guint32     length;
    gchar       data[0];
} __attribute__ ((packed));

I'll probably investigate a little bit

-------------- next part --------------
--- libpurple/protocols/mxit/mxit.c	9ef26e1d45328665ba4e426d0bd8c9163ca850a2
+++ libpurple/protocols/mxit/mxit.c	cf26abf7a9ae90d254296872b794bca1c59d3bae
@@ -690,7 +690,8 @@ static void init_plugin( PurplePlugin* p
 	option = purple_account_option_bool_new( _( "Enable splash-screen popup" ), MXIT_CONFIG_SPLASHPOPUP, FALSE );
 	proto_info.protocol_options = g_list_append( proto_info.protocol_options, option );
-	g_assert( sizeof( struct raw_chunk ) == 5 );
+	if ( sizeof( struct raw_chunk ) != 5 )
+		g_log(G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, "sizeof(struct raw_chunk) != 5!  MXit probably won't work!\n");
 PURPLE_INIT_PLUGIN( mxit, init_plugin, plugin_info );

More information about the Commits mailing list