# HG changeset patch # User Richard Laager # Date 1177700201 0 # Node ID 1c07ce257fd7f5d598f87ae27a10c6b13d03f632 # Parent 1d3d54e964ce2f7d077e1acb7e7c7c3e3f3050bf Fix the g_return_if_fail() guards that prevent setting more than one data source. We want the data sources to be NULL, because the one we're setting needs to be the only one set. diff -r 1d3d54e964ce -r 1c07ce257fd7 libpurple/protocols/msn/slpmsg.c --- a/libpurple/protocols/msn/slpmsg.c Fri Apr 27 18:17:09 2007 +0000 +++ b/libpurple/protocols/msn/slpmsg.c Fri Apr 27 18:56:41 2007 +0000 @@ -106,9 +106,9 @@ long long size) { /* We can only have one data source at a time. */ - g_return_if_fail(slpmsg->buffer); - g_return_if_fail(slpmsg->img); - g_return_if_fail(slpmsg->fp); + g_return_if_fail(slpmsg->buffer == NULL); + g_return_if_fail(slpmsg->img == NULL); + g_return_if_fail(slpmsg->fp == NULL); if (body != NULL) slpmsg->buffer = g_memdup(body, size); @@ -122,9 +122,9 @@ msn_slpmsg_set_image(MsnSlpMessage *slpmsg, PurpleStoredImage *img) { /* We can only have one data source at a time. */ - g_return_if_fail(slpmsg->buffer); - g_return_if_fail(slpmsg->img); - g_return_if_fail(slpmsg->fp); + g_return_if_fail(slpmsg->buffer == NULL); + g_return_if_fail(slpmsg->img == NULL); + g_return_if_fail(slpmsg->fp == NULL); slpmsg->img = purple_imgstore_ref(img); slpmsg->buffer = (guchar *)purple_imgstore_get_data(img); @@ -137,9 +137,9 @@ struct stat st; /* We can only have one data source at a time. */ - g_return_if_fail(slpmsg->buffer); - g_return_if_fail(slpmsg->img); - g_return_if_fail(slpmsg->fp); + g_return_if_fail(slpmsg->buffer == NULL); + g_return_if_fail(slpmsg->img == NULL); + g_return_if_fail(slpmsg->fp == NULL); slpmsg->fp = g_fopen(file_name, "rb");