aboutsummaryrefslogtreecommitdiff
path: root/libraries/meanwhile
diff options
context:
space:
mode:
authorErik Hanson <erik@slackbuilds.org>2013-11-11 16:31:46 -0600
committerErik Hanson <erik@slackbuilds.org>2013-11-11 16:31:46 -0600
commit545781f4135c75b1b022d1f25a3359735e73bb08 (patch)
tree09ed64e8ebc8a3bfb178fd237b829dcf57681752 /libraries/meanwhile
parent2364fe183024163ccb5112d81754163410ff9260 (diff)
libraries/meanwhile: Fix Awareness Snapshots with recent Sametime servers.
Thanks to Felipe Weber. Signed-off-by: Erik Hanson <erik@slackbuilds.org>
Diffstat (limited to 'libraries/meanwhile')
-rw-r--r--libraries/meanwhile/meanwhile.SlackBuild3
-rw-r--r--libraries/meanwhile/presence_fix_v2.diff42
2 files changed, 45 insertions, 0 deletions
diff --git a/libraries/meanwhile/meanwhile.SlackBuild b/libraries/meanwhile/meanwhile.SlackBuild
index 95e1e3fad27e4..7e3e81bd213be 100644
--- a/libraries/meanwhile/meanwhile.SlackBuild
+++ b/libraries/meanwhile/meanwhile.SlackBuild
@@ -66,6 +66,9 @@ chmod -R u+w,go+r-w,a-s .
# Patch to only include glib.h
patch -p1 < $CWD/fix_glib_includes.patch
+# Patch for online status
+patch -p1 < $CWD/presence_fix_v2.diff
+
CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
diff --git a/libraries/meanwhile/presence_fix_v2.diff b/libraries/meanwhile/presence_fix_v2.diff
new file mode 100644
index 0000000000000..e01089eda91c1
--- /dev/null
+++ b/libraries/meanwhile/presence_fix_v2.diff
@@ -0,0 +1,42 @@
+# User Mikael Berthe <mikael.berthe@lilotux.net>
+# Date 1194208892 -3600
+Fix Awareness Snapshots with recent Sametime servers
+
+With recent Sametime servers there seem to be 2 bytes
+after the Snapshot Message Blocks.
+This patch tries to use the end of block offset provided
+by the server.
+
+diff -r be8d8f1d3ebc src/common.c
+--- a/src/common.c Sun Nov 04 18:48:00 2007 +0100
++++ b/src/common.c Tue Nov 06 11:46:26 2007 +0100
+@@ -878,23 +878,24 @@ gboolean mwAwareIdBlock_equal(const stru
+ /* 8.4.2.4 Snapshot */
+
+ void mwAwareSnapshot_get(struct mwGetBuffer *b, struct mwAwareSnapshot *idb) {
+- guint32 junk;
+- char *empty = NULL;
++ guint32 end_of_block;
+
+ g_return_if_fail(b != NULL);
+ g_return_if_fail(idb != NULL);
+
+- guint32_get(b, &junk);
++ guint32_get(b, &end_of_block);
+ mwAwareIdBlock_get(b, &idb->id);
+ mwString_get(b, &idb->group);
+ gboolean_get(b, &idb->online);
+-
+- g_free(empty);
+
+ if(idb->online) {
+ mwString_get(b, &idb->alt_id);
+ mwUserStatus_get(b, &idb->status);
+ mwString_get(b, &idb->name);
++ }
++
++ if( b->ptr < b->buf + end_of_block ) {
++ mwGetBuffer_advance(b, b->buf + end_of_block - b->ptr);
+ }
+ }
+