diff options
Diffstat (limited to 'fix_groupchat.patch')
-rw-r--r-- | fix_groupchat.patch | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/fix_groupchat.patch b/fix_groupchat.patch new file mode 100644 index 000000000000..dcf24d07a501 --- /dev/null +++ b/fix_groupchat.patch @@ -0,0 +1,76 @@ +--- a/src/srvc_place.c 2013-10-02 13:49:18.048588870 -0500 ++++ b/src/srvc_place.c 2013-10-02 13:50:18.027648225 -0500 +@@ -39,6 +39,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 +175,7 @@ + guint16 login_type; + guint32 unknown_a; + guint32 unknown_b; ++ char *extraname; + }; + + +@@ -189,6 +200,7 @@ + mwIdBlock_clear(&p->idb); + g_free(p->login_id); + g_free(p->name); ++ g_free(p->extraname); + g_free(p); + } + +@@ -394,6 +406,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 +534,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 +570,10 @@ + guint32_get(b, &m->unknown_a); + guint32_get(b, &m->unknown_b); + ++ if(newMsgFormat) { ++ mwString_get(b, &m->extraname); ++ } ++ + PUT_MEMBER(place, m); + } + |