From 41ecb0a9c99c25f1767da2c25db3484434421e40 Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10> Date: Mon, 14 Jul 2008 10:59:12 +0000 Subject: client version change, added option to revert git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@420 4f64403b-2f21-0410-a795-97e2b3489a10 --- sametime/session.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'sametime/session.cpp') diff --git a/sametime/session.cpp b/sametime/session.cpp index 99ef6be..1f09da1 100644 --- a/sametime/session.cpp +++ b/sametime/session.cpp @@ -365,15 +365,20 @@ unsigned long __stdcall SessionThread(LPVOID param) { EnterCriticalSection(&session_cs); session = mwSession_new(&handler); - mwSession_setProperty(session, mwSession_CLIENT_VER_MAJOR, (gpointer)(int)(DBGetContactSettingWord(0, PROTO, "ClientVersionMajor", MW_PROTOCOL_VERSION_MAJOR)), 0); - mwSession_setProperty(session, mwSession_CLIENT_VER_MINOR, (gpointer)(int)(DBGetContactSettingWord(0, PROTO, "ClientVersionMinor", MW_PROTOCOL_VERSION_MINOR)), 0); - InitMeanwhileServices(); mwSession_setProperty(session, mwSession_AUTH_USER_ID, options.id, NULL); mwSession_setProperty(session, mwSession_AUTH_PASSWORD, options.pword, NULL); mwSession_setProperty(session, mwSession_CLIENT_TYPE_ID, (void *)options.client_id, NULL); + if(options.use_old_default_client_ver) { + mwSession_setProperty(session, mwSession_CLIENT_VER_MAJOR, GUINT_TO_POINTER(DBGetContactSettingWord(0, PROTO, "ClientVersionMajor", MW_PROTOCOL_VERSION_MAJOR)), 0); + mwSession_setProperty(session, mwSession_CLIENT_VER_MINOR, GUINT_TO_POINTER(DBGetContactSettingWord(0, PROTO, "ClientVersionMinor", MW_PROTOCOL_VERSION_MINOR)), 0); + } else { + mwSession_setProperty(session, mwSession_CLIENT_VER_MAJOR, GUINT_TO_POINTER(DBGetContactSettingWord(0, PROTO, "ClientVersionMajor", 0x001e)), 0); + mwSession_setProperty(session, mwSession_CLIENT_VER_MINOR, GUINT_TO_POINTER(DBGetContactSettingWord(0, PROTO, "ClientVersionMinor", 0x196f)), 0); + } + mwSession_start(session); LeaveCriticalSection(&session_cs); -- cgit v1.2.3