diff options
| author | David Yip <yipdw@alumni.rose-hulman.edu> | 2006-05-03 19:29:21 +0000 |
|---|---|---|
| committer | dwyip <dwyip@users.sourceforge.net> | 2006-05-03 19:29:21 +0000 |
| commit | f529e310de81224e6899b804365825b4ce94e3d8 (patch) | |
| tree | 13f5cb868ea5a345d19c0046177abb7db41a053f /src/jabber_whiteboard/session-manager.cpp | |
| parent | updated link (diff) | |
| download | inkscape-f529e310de81224e6899b804365825b4ce94e3d8.tar.gz inkscape-f529e310de81224e6899b804365825b4ce94e3d8.zip | |
removed lm_initialize calls and supporting infrastructure; loudmouth 1.1.1 does not require it for Win32 operation
(bzr r712)
Diffstat (limited to 'src/jabber_whiteboard/session-manager.cpp')
| -rw-r--r-- | src/jabber_whiteboard/session-manager.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/jabber_whiteboard/session-manager.cpp b/src/jabber_whiteboard/session-manager.cpp index 33c7f2663..5a7dda426 100644 --- a/src/jabber_whiteboard/session-manager.cpp +++ b/src/jabber_whiteboard/session-manager.cpp @@ -60,10 +60,6 @@ namespace Inkscape { namespace Whiteboard { -#ifdef WIN32 -static bool lm_initialize_called = false; -#endif - SessionData::SessionData(SessionManager *sm) { this->_sm = sm; @@ -109,10 +105,12 @@ SessionManager::SessionManager(::SPDesktop *desktop) #ifdef WIN32 //# lm_initialize() must be called before any network code +/* if (!lm_initialize_called) { lm_initialize(); lm_initialize_called = true; } +*/ #endif this->_setVerbSensitivity(INITIAL); @@ -212,6 +210,9 @@ SessionManager::connectToServer(Glib::ustring const& server, Glib::ustring const lm_connection_set_port(this->session_data->connection, atoi(port.c_str())); + g_log(NULL, G_LOG_LEVEL_DEBUG, "Opened connection to %s at port %s. Connecting...", + server.c_str(), port.c_str()); + if (usessl) { if (lm_ssl_is_supported()) { this->session_data->ssl = lm_ssl_new(NULL, ssl_error_handler, reinterpret_cast< gpointer >(this), NULL); @@ -236,11 +237,13 @@ SessionManager::connectToServer(Glib::ustring const& server, Glib::ustring const // to convert this from synchronous to asynchronous Loudmouth calls. if (!lm_connection_open_and_block(this->session_data->connection, &error)) { if (error != NULL) { - g_warning("Failed to open: %s", error->message); + std::cout << "Failed to open: " << error->message << std::endl; } return FAILED_TO_CONNECT; } + g_log(NULL, G_LOG_LEVEL_DEBUG, "Opened Loudmouth connection in blocking mode."); + // Authenticate if (!lm_connection_authenticate_and_block(this->session_data->connection, username.c_str(), pw.c_str(), RESOURCE_NAME, &error)) { if (error != NULL) { @@ -252,6 +255,8 @@ SessionManager::connectToServer(Glib::ustring const& server, Glib::ustring const return INVALID_AUTH; } + g_log(NULL, G_LOG_LEVEL_DEBUG, "Successfully authenticated."); + // Register message handler for presence messages mh = lm_message_handler_new((LmHandleMessageFunction)presence_handler, reinterpret_cast< gpointer >(this->_myMessageHandler), NULL); lm_connection_register_message_handler(this->session_data->connection, mh, LM_MESSAGE_TYPE_PRESENCE, LM_HANDLER_PRIORITY_NORMAL); |
