File meanwhile-1.0.2.patch of Package mingw64-meanwhile
--- meanwhile-1.0.2/src/channel.c 2005-12-08 23:04:46.000000000 +0100
+++ meanwhile-1.0.2/src/channel.c 2013-04-09 11:42:02.335867877 +0200
@@ -19,8 +19,6 @@
*/
#include <glib.h>
-#include <glib/ghash.h>
-#include <glib/glist.h>
#include <string.h>
#include "mw_channel.h"
--- meanwhile-1.0.2/src/common.c 2005-12-08 20:48:36.000000000 +0100
+++ meanwhile-1.0.2/src/common.c 2013-04-09 11:39:48.971449348 +0200
@@ -878,24 +878,25 @@
/* 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);
+ }
}
--- meanwhile-1.0.2/src/Makefile.in 2005-12-30 02:55:18.000000000 +0100
+++ meanwhile-1.0.2/src/Makefile.in 2013-04-09 11:40:36.116291648 +0200
@@ -237,7 +237,7 @@
libmeanwhile_la_LDFLAGS = \
@MW_SO_OS_FLAGS@ \
- -version-info @MW_SO_VERSION@
+ -version-info @MW_SO_VERSION@ -no-undefined
libmeanwhile_la_SOURCES = \
channel.c \
--- meanwhile-1.0.2/src/mw_debug.c 2005-12-03 04:46:10.000000000 +0100
+++ meanwhile-1.0.2/src/mw_debug.c 2013-04-09 11:42:02.335867877 +0200
@@ -19,7 +19,7 @@
*/
-#include <glib/gstring.h>
+#include <glib.h>
#include "mw_debug.h"
--- meanwhile-1.0.2/src/mw_message.h 2005-12-15 01:30:28.000000000 +0100
+++ meanwhile-1.0.2/src/mw_message.h 2013-04-09 11:42:02.336867895 +0200
@@ -22,7 +22,7 @@
#define _MW_MESSAGE_H
-#include <glib/glist.h>
+#include <glib.h>
#include "mw_common.h"
--- meanwhile-1.0.2/src/mw_srvc_conf.h 2005-12-15 01:30:28.000000000 +0100
+++ meanwhile-1.0.2/src/mw_srvc_conf.h 2013-04-09 11:42:02.336867895 +0200
@@ -22,7 +22,7 @@
#define _MW_SRVC_CONF_H
-#include <glib/glist.h>
+#include <glib.h>
#include "mw_common.h"
--- meanwhile-1.0.2/src/mw_srvc_dir.h 2005-12-15 01:30:28.000000000 +0100
+++ meanwhile-1.0.2/src/mw_srvc_dir.h 2013-04-09 11:42:02.336867895 +0200
@@ -22,7 +22,6 @@
#include <glib.h>
-#include <glib/glist.h>
#ifdef __cplusplus
--- meanwhile-1.0.2/src/mw_srvc_place.h 2005-12-15 01:30:28.000000000 +0100
+++ meanwhile-1.0.2/src/mw_srvc_place.h 2013-04-09 11:42:02.336867895 +0200
@@ -22,7 +22,7 @@
#define _MW_SRVC_PLACE_H
-#include <glib/glist.h>
+#include <glib.h>
#include "mw_common.h"
--- meanwhile-1.0.2/src/mw_srvc_resolve.h 2005-12-15 01:30:28.000000000 +0100
+++ meanwhile-1.0.2/src/mw_srvc_resolve.h 2013-04-09 11:42:02.336867895 +0200
@@ -23,7 +23,6 @@
#include <glib.h>
-#include <glib/glist.h>
#ifdef __cplusplus
--- meanwhile-1.0.2/src/mw_st_list.h 2005-12-15 01:30:28.000000000 +0100
+++ meanwhile-1.0.2/src/mw_st_list.h 2013-04-09 11:42:02.336867895 +0200
@@ -30,7 +30,6 @@
#include <glib.h>
-#include <glib/glist.h>
#include "mw_common.h"
--- meanwhile-1.0.2/src/mw_util.h 2004-12-28 21:41:26.000000000 +0100
+++ meanwhile-1.0.2/src/mw_util.h 2013-04-09 11:42:02.336867895 +0200
@@ -23,9 +23,6 @@
#include <glib.h>
-#include <glib/ghash.h>
-#include <glib/glist.h>
-
#define map_guint_new() \
g_hash_table_new(g_direct_hash, g_direct_equal)
--- meanwhile-1.0.2/src/session.c 2005-12-15 21:11:47.000000000 +0100
+++ meanwhile-1.0.2/src/session.c 2013-04-09 11:40:19.407991438 +0200
@@ -240,7 +240,7 @@
case mwSession_LOGIN_REDIR:
g_message("session state: %s (%s)", state_str(state),
- (char *)info);
+ NSTR((char *)info));
break;
default:
--- meanwhile-1.0.2/src/srvc_aware.c 2005-12-08 23:02:11.000000000 +0100
+++ meanwhile-1.0.2/src/srvc_aware.c 2013-04-09 11:42:02.336867895 +0200
@@ -19,8 +19,6 @@
*/
#include <glib.h>
-#include <glib/ghash.h>
-#include <glib/glist.h>
#include <string.h>
#include "mw_channel.h"
--- meanwhile-1.0.2/src/srvc_conf.c 2005-12-28 03:46:54.000000000 +0100
+++ meanwhile-1.0.2/src/srvc_conf.c 2013-04-09 11:42:02.336867895 +0200
@@ -19,8 +19,6 @@
*/
#include <glib.h>
-#include <glib/ghash.h>
-#include <glib/glist.h>
#include <stdio.h>
#include <stdlib.h>
--- meanwhile-1.0.2/src/srvc_dir.c 2005-09-15 22:30:20.000000000 +0200
+++ meanwhile-1.0.2/src/srvc_dir.c 2013-04-09 11:42:02.337867913 +0200
@@ -18,7 +18,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <glib/ghash.h>
+#include <glib.h>
#include "mw_channel.h"
#include "mw_common.h"
--- meanwhile-1.0.2/src/srvc_ft.c 2005-09-15 22:30:37.000000000 +0200
+++ meanwhile-1.0.2/src/srvc_ft.c 2013-04-09 11:42:02.337867913 +0200
@@ -19,7 +19,7 @@
*/
-#include <glib/glist.h>
+#include <glib.h>
#include "mw_channel.h"
#include "mw_common.h"
@@ -142,7 +142,7 @@
mwString_get(b, &fnm); /* offered filename */
mwString_get(b, &txt); /* offering message */
guint32_get(b, &size); /* size of offered file */
- guint32_get(b, &junk); /* unknown */
+ /* guint32_get(b, &junk); */ /* unknown */
/* and we just skip an unknown guint16 at the end */
b_err = mwGetBuffer_error(b);
--- meanwhile-1.0.2/src/srvc_im.c 2005-12-28 03:46:54.000000000 +0100
+++ meanwhile-1.0.2/src/srvc_im.c 2013-04-09 11:42:02.337867913 +0200
@@ -19,7 +19,6 @@
*/
#include <glib.h>
-#include <glib/glist.h>
#include <string.h>
#include "mw_channel.h"
--- meanwhile-1.0.2/src/srvc_place.c 2005-12-03 03:00:29.000000000 +0100
+++ meanwhile-1.0.2/src/srvc_place.c 2013-04-09 11:42:02.337867913 +0200
@@ -19,8 +19,6 @@
*/
#include <glib.h>
-#include <glib/ghash.h>
-#include <glib/glist.h>
#include <stdio.h>
#include <stdlib.h>
@@ -39,6 +37,16 @@
#define PROTOCOL_TYPE 0x00
#define PROTOCOL_VER 0x05
+/*
+ As of Sametime ~v8.5, there's a slightly different group chat invite message.
+ This identifies the earliest server version using the new format. Currently,
+ it's set for 8.5.1. If other people are having issues, we'll need to decrease
+ this to their version.
+*/
+#define NEW_FORMAT_SERVER_VER_MAJOR 0x001e
+#define NEW_FORMAT_SERVER_VER_MINOR 0x213f
+
+#define GUINT(val) (GPOINTER_TO_UINT((val)))
enum incoming_msg {
msg_in_JOIN_RESPONSE = 0x0000, /* ? */
@@ -165,6 +173,7 @@
guint16 login_type;
guint32 unknown_a;
guint32 unknown_b;
+ char *extraname;
};
@@ -189,6 +198,7 @@
mwIdBlock_clear(&p->idb);
g_free(p->login_id);
g_free(p->name);
+ g_free(p->extraname);
g_free(p);
}
@@ -394,6 +404,9 @@
guint16_get(b, &pm->login_type);
guint32_get(b, &pm->unknown_a);
guint32_get(b, &pm->unknown_b);
+ /* TODO: Since the Notes upgrade, an extra name string is sent to
+ recv_SECTION_LIST(). It might be sent here, but since we're only
+ parsing one user, it probably doesn't matter here. */
PUT_MEMBER(place, pm);
if(srvc->handler && srvc->handler->peerJoined)
@@ -519,8 +532,18 @@
static int recv_SECTION_LIST(struct mwPlace *place,
struct mwGetBuffer *b) {
- int ret = 0;
+ int ret = 0, major, minor;
guint32 sec, count;
+ struct mwSession *session;
+ gboolean newMsgFormat;
+
+ /* Check the server version to see if the message uses the new format */
+ session = mwService_getSession(MW_SERVICE(place->service));
+ major = GUINT(mwSession_getProperty(session, mwSession_SERVER_VER_MAJOR));
+ minor = GUINT(mwSession_getProperty(session, mwSession_SERVER_VER_MINOR));
+ newMsgFormat = (major == NEW_FORMAT_SERVER_VER_MAJOR
+ && minor >= NEW_FORMAT_SERVER_VER_MINOR)
+ || major > NEW_FORMAT_SERVER_VER_MAJOR;
mwGetBuffer_advance(b, 4);
guint32_get(b, &sec);
@@ -545,6 +568,10 @@
guint32_get(b, &m->unknown_a);
guint32_get(b, &m->unknown_b);
+ if(newMsgFormat) {
+ mwString_get(b, &m->extraname);
+ }
+
PUT_MEMBER(place, m);
}
--- meanwhile-1.0.2/src/srvc_resolve.c 2005-10-27 02:10:06.000000000 +0200
+++ meanwhile-1.0.2/src/srvc_resolve.c 2013-04-09 11:42:02.337867913 +0200
@@ -18,7 +18,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <glib/ghash.h>
+#include <glib.h>
#include "mw_channel.h"
#include "mw_common.h"
--- meanwhile-1.0.2/src/srvc_store.c 2005-11-19 02:52:42.000000000 +0100
+++ meanwhile-1.0.2/src/srvc_store.c 2013-04-09 11:42:02.337867913 +0200
@@ -18,7 +18,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <glib/glist.h>
+#include <glib.h>
#include "mw_channel.h"
#include "mw_debug.h"
--- meanwhile-1.0.2/src/st_list.c 2005-12-08 23:01:27.000000000 +0100
+++ meanwhile-1.0.2/src/st_list.c 2013-04-09 11:42:02.338867932 +0200
@@ -20,7 +20,7 @@
#include <stdio.h>
#include <string.h>
-#include <glib/gstring.h>
+#include <glib.h>
#include "mw_debug.h"
#include "mw_util.h"