changeset 29006:588fb0db1cd8

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
author Mark Doliner <mark@kingant.net>
date Mon, 23 Nov 2009 00:19:33 +0000
parents 363691903201
children 1b8e39c6d1f3
files libpurple/protocols/mxit/mxit.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/mxit/mxit.c	Sun Nov 22 23:47:35 2009 +0000
+++ b/libpurple/protocols/mxit/mxit.c	Mon Nov 23 00:19:33 2009 +0000
@@ -690,7 +690,8 @@
 	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 );