diff options
author | Szymon Tokarz <wsx22@o2.pl> | 2014-11-11 01:04:07 +0000 |
---|---|---|
committer | Szymon Tokarz <wsx22@o2.pl> | 2014-11-11 01:04:07 +0000 |
commit | eabafdf4b42139ff85a8c8212cd0a9d287171e73 (patch) | |
tree | ef952efd34dddb609a4590f79cdc5e481f647a8e /protocols/Sametime/src/meanwhile | |
parent | b43b7abf33f5b2ab480a85584df0e3ce8c76a8ca (diff) |
Sametime protocol:
- Add more options to client major/minor version settings, add gui combobox (db settings ClientVersionMajor, ClientVersionMinor used and still works if set from db)
Enables connect to more modern servers
- More ClientIDs on combobox list.
- Better list of error codes, now translateable.
- Merge some 3rd party patches to meanwhile lib.
https://gist.github.com/jricesterenator/c67dfbdd0887f7ecc26a
https://github.com/mrcsparker/meanwhile/commit/e2299d3c70a3351ab148f4febdebceb71f7b526d
https://github.com/mrcsparker/meanwhile/commit/2e68651f13aebeab9e71312e59da204d3d72092c
git-svn-id: http://svn.miranda-ng.org/main/trunk@10949 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Sametime/src/meanwhile')
21 files changed, 278 insertions, 62 deletions
diff --git a/protocols/Sametime/src/meanwhile/src/channel.c b/protocols/Sametime/src/meanwhile/src/channel.c index a9dc2836be..07334c18e7 100644 --- a/protocols/Sametime/src/meanwhile/src/channel.c +++ b/protocols/Sametime/src/meanwhile/src/channel.c @@ -19,8 +19,6 @@ */ #include <glib.h> -#include <glib/ghash.h> -#include <glib/glist.h> #include <string.h> #include "mw_channel.h" diff --git a/protocols/Sametime/src/meanwhile/src/error.c b/protocols/Sametime/src/meanwhile/src/error.c index 23c9559802..6005eddbd1 100644 --- a/protocols/Sametime/src/meanwhile/src/error.c +++ b/protocols/Sametime/src/meanwhile/src/error.c @@ -37,6 +37,9 @@ case val: \ m = str; \ break; +/// Miranda NG development start +// LPGEN - don't want depend meanwhile from miranda headers, but want to have translatable strings +#define LPGEN(s) s char* mwError(guint32 code) { const char *m; @@ -44,47 +47,106 @@ char* mwError(guint32 code) { switch(code) { /* 8.3.1.1 General error/success codes */ - CASE(ERR_SUCCESS, "Success"); - CASE(ERR_FAILURE, "General failure"); - CASE(ERR_REQUEST_DELAY, "Request delayed"); - CASE(ERR_REQUEST_INVALID, "Request is invalid"); - CASE(ERR_NOT_AUTHORIZED, "Not authorized"); - CASE(ERR_NO_USER, "User is not online"); - CASE(ERR_CHANNEL_NO_SUPPORT, "Requested channel is not supported"); - CASE(ERR_CHANNEL_EXISTS, "Requested channel already exists"); - CASE(ERR_SERVICE_NO_SUPPORT, "Requested service is not supported"); - CASE(ERR_PROTOCOL_NO_SUPPORT, "Requested protocol is not supported"); - CASE(ERR_VERSION_NO_SUPPORT, "Version is not supported"); - CASE(ERR_USER_SKETCHY, "User is invalid or not trusted"); - CASE(ERR_ALREADY_INITIALIZED, "Already initialized"); - CASE(ERR_ENCRYPT_NO_SUPPORT, "Encryption method not supported"); - CASE(ERR_NO_COMMON_ENCRYPT, "No common encryption method"); - + CASE(ERR_SUCCESS, LPGEN("Success")); + CASE(ERR_FAILURE, LPGEN("General failure")); + CASE(ERR_REQUEST_DELAY, LPGEN("Request delayed")); + CASE(ERR_REQUEST_INVALID, LPGEN("Request is invalid")); + CASE(ERR_NOT_LOGGED_IN, LPGEN("Not logged in")); + CASE(ERR_NOT_AUTHORIZED, LPGEN("Not authorized")); + CASE(ERR_ABORT, LPGEN("Operation aborted")); + CASE(ERR_NO_ELEMENT, LPGEN("No element")); + CASE(ERR_NO_USER, LPGEN("User is not online")); + CASE(ERR_BAD_DATA, LPGEN("Invalid data")); + CASE(ERR_NOT_IMPLEMENTED, LPGEN("Not implemented")); + CASE(ERR_UNKNOWN_ERROR, LPGEN("Unknown error")); + CASE(ERR_STARVING, LPGEN("Not enough resources")); + CASE(ERR_CHANNEL_NO_SUPPORT, LPGEN("Requested channel is not supported")); + CASE(ERR_CHANNEL_EXISTS, LPGEN("Requested channel already exists")); + CASE(ERR_SERVICE_NO_SUPPORT, LPGEN("Requested service is not supported")); + CASE(ERR_PROTOCOL_NO_SUPPORT, LPGEN("Requested protocol is not supported")); + CASE(ERR_PROTOCOL_NO_SUPPORT2, LPGEN("Requested protocol is not supported")); + CASE(ERR_VERSION_NO_SUPPORT, LPGEN("Version is not supported")); + CASE(ERR_USER_SKETCHY, LPGEN("User is invalid or not trusted")); + CASE(ERR_ALREADY_INITIALIZED, LPGEN("Already initialized")); + CASE(ERR_NOT_OWNER, LPGEN("Not an owner")); + CASE(ERR_TOKEN_INVALID, LPGEN("Invalid token")); + CASE(ERR_TOKEN_EXPIRED, LPGEN("Token expired")); + CASE(ERR_TOKEN_IP_MISMATCH, LPGEN("Token mismatch")); + CASE(ERR_PORT_IN_USE, LPGEN("Port in use")); + CASE(ERR_NETWORK_DEAD, LPGEN("Network error")); + CASE(ERR_NO_MASTER_CHANNEL, LPGEN("Master channel error")); + CASE(ERR_ALREADY_SUBSCRIBED, LPGEN("Already subscribed")); + CASE(ERR_NOT_SUBSCRIBED, LPGEN("Not subscribed")); + CASE(ERR_ENCRYPT_NO_SUPPORT, LPGEN("Encryption method not supported")); + CASE(ERR_ENCRYPT_UNINITIALIZED, LPGEN("Encryption not initialized")); + CASE(ERR_ENCRYPT_UNACCEPTABLE, LPGEN("Encryption too low")); + CASE(ERR_ENCRYPT_INVALID, LPGEN("Invalid encrypted data")); + CASE(ERR_NO_COMMON_ENCRYPT, LPGEN("No common encryption method")); + CASE(ERR_CHANNEL_DESTROYED, LPGEN("Channel destroyed")); + CASE(ERR_CHANNEL_REDIRECTED, LPGEN("Channel redirected")); + CASE(ERR_INCORRECT_ENTRY, LPGEN("Incorrect entry")); + /* 8.3.1.2 Connection/disconnection errors */ - CASE(VERSION_MISMATCH, "Version mismatch"); - CASE(FAT_MESSAGE, "Message is too large"); - CASE(CONNECTION_BROKEN, "Connection broken"); - CASE(CONNECTION_ABORTED, "Connection aborted"); - CASE(CONNECTION_REFUSED, "Connection refused"); - CASE(CONNECTION_RESET, "Connection reset"); - CASE(CONNECTION_TIMED, "Connection timed out"); - CASE(CONNECTION_CLOSED, "Connection closed"); - CASE(INCORRECT_LOGIN, "Incorrect Username/Password"); - CASE(VERIFICATION_DOWN, "Login verification down or unavailable"); - CASE(GUEST_IN_USE, "The guest name is currently being used"); - CASE(MULTI_SERVER_LOGIN, "Login to two different servers concurrently"); - CASE(MULTI_SERVER_LOGIN2, "Login to two different servers concurrently"); - CASE(SERVER_BROKEN, "Server misconfiguration"); + CASE(VERSION_MISMATCH, LPGEN("Version mismatch")); + CASE(INSUF_BUFFER, LPGEN("Not enough buffers memory")); + CASE(NOT_IN_USE, LPGEN("Not in use")); + CASE(INSUF_SOCKET, LPGEN("Not enough sockets")); + CASE(HARDWARE_ERROR, LPGEN("Hardware error")); + CASE(NETWORK_DOWN, LPGEN("Network error")); + CASE(HOST_DOWN, LPGEN("Host error")); + CASE(HOST_UNREACHABLE, LPGEN("Host unreachable")); + CASE(TCPIP_ERROR, LPGEN("Internet protocol error")); + CASE(FAT_MESSAGE, LPGEN("Message is too large")); + CASE(PROXY_ERROR, LPGEN("Proxy error")); + CASE(SERVER_FULL, LPGEN("Server full")); + CASE(SERVER_NORESPOND, LPGEN("Server not responding")); + CASE(CANT_CONNECT, LPGEN("Connection error")); + CASE(USER_REMOVED, LPGEN("User removed")); + CASE(PROTOCOL_ERROR, LPGEN("Sametime protocol error")); + CASE(USER_RESTRICTED, LPGEN("User restricted")); + CASE(INCORRECT_LOGIN, LPGEN("Incorrect Username/Password")); + CASE(ENCRYPT_MISMATCH, LPGEN("Encryption mismatch")); + CASE(USER_UNREGISTERED, LPGEN("User unregistered")); + CASE(VERIFICATION_DOWN, LPGEN("Login verification down or unavailable")); + CASE(USER_TOO_IDLE, LPGEN("User too idle")); + CASE(GUEST_IN_USE, LPGEN("The guest name is currently being used")); + CASE(USER_EXISTS, LPGEN("User exists")); + CASE(USER_RE_LOGIN, LPGEN("User relogin")); + CASE(BAD_NAME, LPGEN("Bad name")); + CASE(REG_MODE_NS, LPGEN("Registration error")); + CASE(WRONG_USER_PRIV, LPGEN("Privilage error")); + CASE(NEED_EMAIL, LPGEN("Need email")); + CASE(DNS_ERROR, LPGEN("DNS error")); + CASE(DNS_FATAL_ERROR, LPGEN("DNS fatal error")); + CASE(DNS_NOT_FOUND, LPGEN("DNS not found")); + CASE(CONNECTION_BROKEN, LPGEN("Connection broken")); + CASE(CONNECTION_ABORTED, LPGEN("Connection aborted")); + CASE(CONNECTION_REFUSED, LPGEN("Connection refused")); + CASE(CONNECTION_RESET, LPGEN("Connection reset")); + CASE(CONNECTION_TIMED, LPGEN("Connection timed out")); + CASE(CONNECTION_CLOSED, LPGEN("Connection closed")); + CASE(MULTI_SERVER_LOGIN, LPGEN("Login to two different servers concurrently (1)")); + CASE(MULTI_SERVER_LOGIN2, LPGEN("Login to two different servers concurrently (2)")); + CASE(MULTI_LOGIN_COMP, LPGEN("Already logged on, disconnected")); + CASE(MUTLI_LOGIN_ALREADY, LPGEN("Already logged on")); + CASE(SERVER_BROKEN, LPGEN("Server misconfiguration")); + CASE(SERVER_PATH_OLD, LPGEN("Server needs upgrade")); + CASE(APPLET_LOGOUT, LPGEN("Applet Logout")); /* 8.3.1.3 Client error codes */ - CASE(ERR_CLIENT_USER_GONE, "User is not online"); - CASE(ERR_CLIENT_USER_DND, "User is in Do Not Disturb mode"); - CASE(ERR_CLIENT_USER_ELSEWHERE, "Already logged in elsewhere"); + CASE(ERR_CLIENT_USER_GONE, LPGEN("User is not online")); + CASE(ERR_CLIENT_USER_DND, LPGEN("User is in Do Not Disturb mode")); + CASE(ERR_CLIENT_USER_ELSEWHERE, LPGEN("Already logged in elsewhere")); /* 8.3.1.4 IM error codes */ - CASE(ERR_IM_COULDNT_REGISTER, "Cannot register a reserved type"); - CASE(ERR_IM_ALREADY_REGISTERED, "Requested type is already registered"); - CASE(ERR_IM_NOT_REGISTERED, "Requested type is not registered"); + CASE(ERR_IM_COULDNT_REGISTER, LPGEN("Cannot register a reserved type")); + CASE(ERR_IM_ALREADY_REGISTERED, LPGEN("Requested type is already registered")); + CASE(ERR_IM_NOT_REGISTERED, LPGEN("Requested type is not registered")); + + /* 8.3.1.5 Resolve error codes */ + CASE(ERR_RESOLVE_NOTCOMPLETED, LPGEN("Resolve not completed")); + CASE(ERR_RESOLVE_NAMENOTUNIQUE, LPGEN("Resolve name not unique")); + CASE(ERR_RESOLVE_NAMENOTRESOLVABLE, LPGEN("Resolve name not resolvable")); default: m = err_to_str(code); @@ -93,5 +155,137 @@ char* mwError(guint32 code) { return g_strdup(m); } +char* mwErrorDesc(guint32 code) { + const char *m; + + switch (code) { + + /* 8.3.1.1 General error/success codes */ + CASE(ERR_SUCCESS, LPGEN("Operation succeeded")); + CASE(ERR_FAILURE, LPGEN("Operation failed")); + CASE(ERR_REQUEST_DELAY, LPGEN("Request accepted but will be served later")); + CASE(ERR_REQUEST_INVALID, LPGEN("Request is invalid due to invalid state or parameters ")); + CASE(ERR_NOT_LOGGED_IN, LPGEN("Not logged in to community")); + CASE(ERR_NOT_AUTHORIZED, LPGEN("Unauthorized to perform an action or access a resource")); + CASE(ERR_ABORT, LPGEN("Operation has been aborted")); + CASE(ERR_NO_ELEMENT, LPGEN("The element is non-existent")); + CASE(ERR_NO_USER, LPGEN("The user is non-existent")); + CASE(ERR_BAD_DATA, LPGEN("The data are invalid or corrupted")); + CASE(ERR_NOT_IMPLEMENTED, LPGEN("The requested feature is not implemented")); + CASE(ERR_UNKNOWN_ERROR, LPGEN("Unknown error")); + CASE(ERR_STARVING, LPGEN("Not enough resources to perform the operation")); + CASE(ERR_CHANNEL_NO_SUPPORT, LPGEN("The requested channel is not supported")); + CASE(ERR_CHANNEL_EXISTS, LPGEN("The requested channel already exists")); + CASE(ERR_SERVICE_NO_SUPPORT, LPGEN("The requested service is not supported")); + CASE(ERR_PROTOCOL_NO_SUPPORT, LPGEN("The requested protocol is not supported (1)")); + CASE(ERR_PROTOCOL_NO_SUPPORT2, LPGEN("The requested protocol is not supported (2)")); + CASE(ERR_VERSION_NO_SUPPORT, LPGEN("The version is not supported")); + CASE(ERR_USER_SKETCHY, LPGEN("User is invalid or not trusted")); + CASE(ERR_ALREADY_INITIALIZED, LPGEN("Already initialized")); + CASE(ERR_NOT_OWNER, LPGEN("Not an owner of the requested resource")); + CASE(ERR_TOKEN_INVALID, LPGEN("Invalid token")); + CASE(ERR_TOKEN_EXPIRED, LPGEN("Token has expired")); + CASE(ERR_TOKEN_IP_MISMATCH, LPGEN("Token IP mismatch")); + CASE(ERR_PORT_IN_USE, LPGEN("WK port is in use")); + CASE(ERR_NETWORK_DEAD, LPGEN("Low-level network error occurred")); + CASE(ERR_NO_MASTER_CHANNEL, LPGEN("No master channel exists")); + CASE(ERR_ALREADY_SUBSCRIBED, LPGEN("Already subscribed to object(s) or event(s)")); + CASE(ERR_NOT_SUBSCRIBED, LPGEN("Not subscribed to object(s) or event(s)")); + CASE(ERR_ENCRYPT_NO_SUPPORT, LPGEN("Encryption is not supported or failed unexpectedly")); + CASE(ERR_ENCRYPT_UNINITIALIZED, LPGEN("Encryption mechanism has not been initialized yet")); + CASE(ERR_ENCRYPT_UNACCEPTABLE, LPGEN("The requested encryption level is unacceptably low")); + CASE(ERR_ENCRYPT_INVALID, LPGEN("The encryption data passed are invalid or or corrupted")); + CASE(ERR_NO_COMMON_ENCRYPT, LPGEN("There is no common encryption method")); + CASE(ERR_CHANNEL_DESTROYED, LPGEN("The channel is destroyed after a recommendation is made connect elsewhere")); + CASE(ERR_CHANNEL_REDIRECTED, LPGEN("The channel has been redirected to another destination")); + CASE(ERR_INCORRECT_ENTRY, LPGEN("Incorrect entry for server in cluster document")); + + /* 8.3.1.3 Client error codes */ + CASE(VERSION_MISMATCH, LPGEN("Versions don't match")); + CASE(INSUF_BUFFER, LPGEN("Not enough resources for connection (buffers)")); + CASE(NOT_IN_USE, LPGEN("Not in use")); + CASE(INSUF_SOCKET, LPGEN("Not enough resources for connection (socket id)")); + CASE(HARDWARE_ERROR, LPGEN("Hardware error occurred")); + CASE(NETWORK_DOWN, LPGEN("Network down")); + CASE(HOST_DOWN, LPGEN("Host down")); + CASE(HOST_UNREACHABLE, LPGEN("Host unreachable")); + CASE(TCPIP_ERROR, LPGEN("TCP/IP protocol error")); + CASE(FAT_MESSAGE, LPGEN("The message is too large")); + CASE(PROXY_ERROR, LPGEN("Proxy error")); + CASE(SERVER_FULL, LPGEN("Server is full")); + CASE(SERVER_NORESPOND, LPGEN("Server is not responding")); + CASE(CANT_CONNECT, LPGEN("Cannot connect")); + CASE(USER_REMOVED, LPGEN("User has been removed from the server")); + CASE(PROTOCOL_ERROR, LPGEN("Virtual Places protocol error")); + CASE(USER_RESTRICTED, LPGEN("Cannot connect because user has been restricted")); + CASE(INCORRECT_LOGIN, LPGEN("Incorrect login")); + CASE(ENCRYPT_MISMATCH, LPGEN("Encryption mismatch")); + CASE(USER_UNREGISTERED, LPGEN("User is unregistered")); + CASE(VERIFICATION_DOWN, LPGEN("Verification service down")); + CASE(USER_TOO_IDLE, LPGEN("User has been idle for too long")); + CASE(GUEST_IN_USE, LPGEN("The guest name is currently being used")); + CASE(USER_EXISTS, LPGEN("The user is already signed on")); + CASE(USER_RE_LOGIN, LPGEN("The user has signed on again")); + CASE(BAD_NAME, LPGEN("The name cannot be used")); + CASE(REG_MODE_NS, LPGEN("The registration mode is not supported")); + CASE(WRONG_USER_PRIV, LPGEN("User does not have appropriate privilege level")); + CASE(NEED_EMAIL, LPGEN("Email address must be used")); + CASE(DNS_ERROR, LPGEN("Error in DNS")); + CASE(DNS_FATAL_ERROR, LPGEN("Fatal error in DNS")); + CASE(DNS_NOT_FOUND, LPGEN("Server name not found")); + CASE(CONNECTION_BROKEN, LPGEN("The connection has been broken")); + CASE(CONNECTION_ABORTED, LPGEN("An established connection was aborted by the software in the host machine")); + CASE(CONNECTION_REFUSED, LPGEN("The connection has been refused")); + CASE(CONNECTION_RESET, LPGEN("The connection has been reset")); + CASE(CONNECTION_TIMED, LPGEN("The connection has timed out")); + CASE(CONNECTION_CLOSED, LPGEN("The connection has been closed")); + CASE(MULTI_SERVER_LOGIN, LPGEN("Disconnected due to login in two Sametime servers concurrently (1)")); + CASE(MULTI_SERVER_LOGIN2, LPGEN("Disconnected due to login in two Sametime servers concurrently (2)")); + CASE(MULTI_LOGIN_COMP, LPGEN("Disconnected due to login from another computer.")); + CASE(MUTLI_LOGIN_ALREADY, LPGEN("Unable to log in because you are already logged on from another computer")); + CASE(SERVER_BROKEN, LPGEN("Unable to log in because the server is eother unreachable, or not configured properly.")); + CASE(SERVER_PATH_OLD, LPGEN("Unable to log in to home Sametime server through the requested server, since your home server needs to be upgraded.")); + CASE(APPLET_LOGOUT, LPGEN("The applet was logged out with this reason. Perform relogin and you will return to the former state.")); + + /* 8.3.1.3 Client error codes */ + CASE(ERR_CLIENT_USER_GONE, LPGEN("The user is not online")); + CASE(ERR_CLIENT_USER_DND, LPGEN("The user is in do not disturb mode")); + CASE(ERR_CLIENT_USER_ELSEWHERE, LPGEN("Can not login because already logged in with a different user name (Java only)")); + + /* 8.3.1.4 IM error codes */ + CASE(ERR_IM_COULDNT_REGISTER, LPGEN("Cannot register a reserved type")); + CASE(ERR_IM_ALREADY_REGISTERED, LPGEN("The requested type is already registered")); + CASE(ERR_IM_NOT_REGISTERED, LPGEN("The requested type is not registered")); + + /* 8.3.1.5 Resolve error codes */ + CASE(ERR_RESOLVE_NOTCOMPLETED, LPGEN("The resolve process was not completed, but a partial response is available")); + CASE(ERR_RESOLVE_NAMENOTUNIQUE, LPGEN("The name was found, but is not unique (request was for unique only)")); + CASE(ERR_RESOLVE_NAMENOTRESOLVABLE, LPGEN("The name is not resolvable due to its format, for example an Internet email address")); + + default: + m = LPGEN("Unknown error code"); + break; + } + + return g_strdup(m); +} + +struct mwReturnCodeDesc *mwGetReturnCodeDesc(guint32 code) { + struct mwReturnCodeDesc *rcDesc = g_new(struct mwReturnCodeDesc, 1); + + if (code & ERR_FAILURE) + rcDesc->type = mwReturnCodeError; + else + rcDesc->type = mwReturnCodeInfo; + + rcDesc->codeString = g_strdup(err_to_str(code)); + rcDesc->name = mwError(code); + rcDesc->description = mwErrorDesc(code); + + return rcDesc; +} +/// Miranda NG development end + + #undef CASE diff --git a/protocols/Sametime/src/meanwhile/src/mw_debug.c b/protocols/Sametime/src/meanwhile/src/mw_debug.c index cf47a38e38..d22d2876eb 100644 --- a/protocols/Sametime/src/meanwhile/src/mw_debug.c +++ b/protocols/Sametime/src/meanwhile/src/mw_debug.c @@ -19,7 +19,7 @@ */ -#include <glib/gstring.h> +#include <glib.h> #include "mw_debug.h" diff --git a/protocols/Sametime/src/meanwhile/src/mw_error.h b/protocols/Sametime/src/meanwhile/src/mw_error.h index 6345358561..e53cc0c996 100644 --- a/protocols/Sametime/src/meanwhile/src/mw_error.h +++ b/protocols/Sametime/src/meanwhile/src/mw_error.h @@ -40,6 +40,22 @@ extern "C" { #endif +/// Miranda NG development start +enum mwReturnCodeType { + mwReturnCodeInfo = 0x1000, + mwReturnCodeError = 0x2000 +}; + +struct mwReturnCodeDesc { + guint16 type; /**< @see mwReturnCodeType */ + char *codeString; /**< return code hex as string */ + char *name; /**< return code name */ + char *description; /**< return code description */ +}; + +struct mwReturnCodeDesc *mwGetReturnCodeDesc(guint32 code); +/// Miranda NG development end + /** reference to a new string appropriate for the given error code.*/ char* mwError(guint32 code); @@ -87,7 +103,11 @@ enum ERR_GENERAL { ERR_ENCRYPT_INVALID = 0x80000020, ERR_NO_COMMON_ENCRYPT = 0x80000021, ERR_CHANNEL_DESTROYED = 0x80000022, - ERR_CHANNEL_REDIRECTED = 0x80000023 + /// Miranda NG development start + //ERR_CHANNEL_REDIRECTED = 0x80000023 + ERR_CHANNEL_REDIRECTED = 0x00000023, + ERR_INCORRECT_ENTRY = 0x80000239
+ /// Miranda NG development end }; @@ -166,6 +186,18 @@ enum ERR_IM { }; +/// Miranda NG development start +/* 8.3.1.5 Resolve error codes */ + +/** @enum ERR_RESOLVE +Resolve error codes */ +enum ERR_RESOLVE { + ERR_RESOLVE_NOTCOMPLETED = 0x00010000, + ERR_RESOLVE_NAMENOTUNIQUE = 0x80020000, + ERR_RESOLVE_NAMENOTRESOLVABLE = 0x80030000
+}; +/// Miranda NG development end + #ifdef __cplusplus } #endif diff --git a/protocols/Sametime/src/meanwhile/src/mw_message.h b/protocols/Sametime/src/meanwhile/src/mw_message.h index 8402b8b7ee..a825ec271b 100644 --- a/protocols/Sametime/src/meanwhile/src/mw_message.h +++ b/protocols/Sametime/src/meanwhile/src/mw_message.h @@ -22,7 +22,7 @@ #define _MW_MESSAGE_H -#include <glib/glist.h> +#include <glib.h> #include "mw_common.h" diff --git a/protocols/Sametime/src/meanwhile/src/mw_srvc_conf.h b/protocols/Sametime/src/meanwhile/src/mw_srvc_conf.h index 1447fd3830..ea162e6e73 100644 --- a/protocols/Sametime/src/meanwhile/src/mw_srvc_conf.h +++ b/protocols/Sametime/src/meanwhile/src/mw_srvc_conf.h @@ -22,7 +22,7 @@ #define _MW_SRVC_CONF_H -#include <glib/glist.h> +#include <glib.h> #include "mw_common.h" diff --git a/protocols/Sametime/src/meanwhile/src/mw_srvc_dir.h b/protocols/Sametime/src/meanwhile/src/mw_srvc_dir.h index b9230bbf08..c45e850232 100644 --- a/protocols/Sametime/src/meanwhile/src/mw_srvc_dir.h +++ b/protocols/Sametime/src/meanwhile/src/mw_srvc_dir.h @@ -22,7 +22,6 @@ #include <glib.h> -#include <glib/glist.h> #ifdef __cplusplus diff --git a/protocols/Sametime/src/meanwhile/src/mw_srvc_place.h b/protocols/Sametime/src/meanwhile/src/mw_srvc_place.h index e17aa711c5..bba97b61e9 100644 --- a/protocols/Sametime/src/meanwhile/src/mw_srvc_place.h +++ b/protocols/Sametime/src/meanwhile/src/mw_srvc_place.h @@ -22,7 +22,7 @@ #define _MW_SRVC_PLACE_H -#include <glib/glist.h> +#include <glib.h> #include "mw_common.h" diff --git a/protocols/Sametime/src/meanwhile/src/mw_srvc_resolve.h b/protocols/Sametime/src/meanwhile/src/mw_srvc_resolve.h index 436b20a5d5..5429640a1e 100644 --- a/protocols/Sametime/src/meanwhile/src/mw_srvc_resolve.h +++ b/protocols/Sametime/src/meanwhile/src/mw_srvc_resolve.h @@ -23,7 +23,6 @@ #include <glib.h> -#include <glib/glist.h> #ifdef __cplusplus diff --git a/protocols/Sametime/src/meanwhile/src/mw_st_list.h b/protocols/Sametime/src/meanwhile/src/mw_st_list.h index 39e1cbf84b..d54de15bac 100644 --- a/protocols/Sametime/src/meanwhile/src/mw_st_list.h +++ b/protocols/Sametime/src/meanwhile/src/mw_st_list.h @@ -30,7 +30,6 @@ #include <glib.h> -#include <glib/glist.h> #include "mw_common.h" diff --git a/protocols/Sametime/src/meanwhile/src/mw_util.h b/protocols/Sametime/src/meanwhile/src/mw_util.h index b8e0b7e968..a94b85131f 100644 --- a/protocols/Sametime/src/meanwhile/src/mw_util.h +++ b/protocols/Sametime/src/meanwhile/src/mw_util.h @@ -23,8 +23,6 @@ #include <glib.h> -#include <glib/ghash.h> -#include <glib/glist.h> #define map_guint_new() \ diff --git a/protocols/Sametime/src/meanwhile/src/session.c b/protocols/Sametime/src/meanwhile/src/session.c index 6c116b7a58..d02d3a09bd 100644 --- a/protocols/Sametime/src/meanwhile/src/session.c +++ b/protocols/Sametime/src/meanwhile/src/session.c @@ -450,6 +450,8 @@ static void HANDSHAKE_ACK_recv(struct mwSession *s, property_set(s, mwSession_SERVER_VER_MAJOR, GPOINTER(msg->major), NULL); property_set(s, mwSession_SERVER_VER_MINOR, GPOINTER(msg->minor), NULL); + g_message("Sametime server version (major/minor): 0x%x / 0x%x", msg->major, msg->minor); + /* compose the login message */ log = (struct mwMsgLogin *) mwMessage_new(mwMessage_LOGIN); log->login_type = GUINT(property_get(s, mwSession_CLIENT_TYPE_ID)); diff --git a/protocols/Sametime/src/meanwhile/src/srvc_aware.c b/protocols/Sametime/src/meanwhile/src/srvc_aware.c index 8c11be229f..8c399b9832 100644 --- a/protocols/Sametime/src/meanwhile/src/srvc_aware.c +++ b/protocols/Sametime/src/meanwhile/src/srvc_aware.c @@ -19,8 +19,6 @@ */ #include <glib.h> -#include <glib/ghash.h> -#include <glib/glist.h> #include <string.h> #include "mw_channel.h" diff --git a/protocols/Sametime/src/meanwhile/src/srvc_conf.c b/protocols/Sametime/src/meanwhile/src/srvc_conf.c index f302a706f8..46d12fd849 100644 --- a/protocols/Sametime/src/meanwhile/src/srvc_conf.c +++ b/protocols/Sametime/src/meanwhile/src/srvc_conf.c @@ -19,8 +19,6 @@ */ #include <glib.h> -#include <glib/ghash.h> -#include <glib/glist.h> #include <stdio.h> #include <stdlib.h> diff --git a/protocols/Sametime/src/meanwhile/src/srvc_dir.c b/protocols/Sametime/src/meanwhile/src/srvc_dir.c index 1505f69c53..be944429cf 100644 --- a/protocols/Sametime/src/meanwhile/src/srvc_dir.c +++ b/protocols/Sametime/src/meanwhile/src/srvc_dir.c @@ -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" diff --git a/protocols/Sametime/src/meanwhile/src/srvc_ft.c b/protocols/Sametime/src/meanwhile/src/srvc_ft.c index 38479e3452..df623e5181 100644 --- a/protocols/Sametime/src/meanwhile/src/srvc_ft.c +++ b/protocols/Sametime/src/meanwhile/src/srvc_ft.c @@ -19,7 +19,7 @@ */ -#include <glib/glist.h> +#include <glib.h> #include "mw_channel.h" #include "mw_common.h" diff --git a/protocols/Sametime/src/meanwhile/src/srvc_im.c b/protocols/Sametime/src/meanwhile/src/srvc_im.c index b03991d3b9..c200487812 100644 --- a/protocols/Sametime/src/meanwhile/src/srvc_im.c +++ b/protocols/Sametime/src/meanwhile/src/srvc_im.c @@ -19,7 +19,6 @@ */ #include <glib.h> -#include <glib/glist.h> #include <string.h> #include "mw_channel.h" diff --git a/protocols/Sametime/src/meanwhile/src/srvc_place.c b/protocols/Sametime/src/meanwhile/src/srvc_place.c index 5029dffbb8..d07e886bc9 100644 --- a/protocols/Sametime/src/meanwhile/src/srvc_place.c +++ b/protocols/Sametime/src/meanwhile/src/srvc_place.c @@ -19,8 +19,6 @@ */ #include <glib.h> -#include <glib/ghash.h> -#include <glib/glist.h> #include <stdio.h> #include <stdlib.h> diff --git a/protocols/Sametime/src/meanwhile/src/srvc_resolve.c b/protocols/Sametime/src/meanwhile/src/srvc_resolve.c index bb4c536be8..3a282291cc 100644 --- a/protocols/Sametime/src/meanwhile/src/srvc_resolve.c +++ b/protocols/Sametime/src/meanwhile/src/srvc_resolve.c @@ -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" diff --git a/protocols/Sametime/src/meanwhile/src/srvc_store.c b/protocols/Sametime/src/meanwhile/src/srvc_store.c index f537195e08..edfd0281ef 100644 --- a/protocols/Sametime/src/meanwhile/src/srvc_store.c +++ b/protocols/Sametime/src/meanwhile/src/srvc_store.c @@ -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" diff --git a/protocols/Sametime/src/meanwhile/src/st_list.c b/protocols/Sametime/src/meanwhile/src/st_list.c index 949696a4a1..186d5a39a3 100644 --- a/protocols/Sametime/src/meanwhile/src/st_list.c +++ b/protocols/Sametime/src/meanwhile/src/st_list.c @@ -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" @@ -662,7 +662,9 @@ void mwSametimeList_get(struct mwGetBuffer *b, struct mwSametimeList *l) { g_return_if_fail(b != NULL); mwString_get(b, &str); - list_get(str, l); - g_free(str); + if (str) { + list_get(str, l); + g_free(str); + } } |