Converted these images to PNG, saving a handful of bytes per image
[adiumx.git] / Utilities / dep-build-scripts / meanwhile_prescence_newservers_fix_1626349.diff
blobe01089eda91c1fdbc9ad1ca6bb03ddf786b6073a
1 # User Mikael Berthe <mikael.berthe@lilotux.net>
2 # Date 1194208892 -3600
3 Fix Awareness Snapshots with recent Sametime servers
5 With recent Sametime servers there seem to be 2 bytes
6 after the Snapshot Message Blocks.
7 This patch tries to use the end of block offset provided
8 by the server.
10 diff -r be8d8f1d3ebc src/common.c
11 --- a/src/common.c Sun Nov 04 18:48:00 2007 +0100
12 +++ b/src/common.c Tue Nov 06 11:46:26 2007 +0100
13 @@ -878,23 +878,24 @@ gboolean mwAwareIdBlock_equal(const stru
14 /* 8.4.2.4 Snapshot */
16 void mwAwareSnapshot_get(struct mwGetBuffer *b, struct mwAwareSnapshot *idb) {
17 - guint32 junk;
18 - char *empty = NULL;
19 + guint32 end_of_block;
21 g_return_if_fail(b != NULL);
22 g_return_if_fail(idb != NULL);
24 - guint32_get(b, &junk);
25 + guint32_get(b, &end_of_block);
26 mwAwareIdBlock_get(b, &idb->id);
27 mwString_get(b, &idb->group);
28 gboolean_get(b, &idb->online);
30 - g_free(empty);
32 if(idb->online) {
33 mwString_get(b, &idb->alt_id);
34 mwUserStatus_get(b, &idb->status);
35 mwString_get(b, &idb->name);
36 + }
38 + if( b->ptr < b->buf + end_of_block ) {
39 + mwGetBuffer_advance(b, b->buf + end_of_block - b->ptr);