Hi!
This fixes the crashing when closing the chat dialog.
I'm not sure if this is the right way to do that
but at least this works. :)
(CChatManager::CloseChat() is still called twice, but
it doesn't matter?)
--- icqd-chat.cpp.original Fri Jan 4 15:06:11 2002
+++ icqd-chat.cpp Fri Jan 4 15:11:05 2002
@@ -1907,6 +1907,18 @@
//----CChatManager::CloseChat------------------------------------------------
void CChatManager::CloseChat()
{
+ // Close the chat thread
+ if (pipe_thread[PIPE_WRITE] != -1)
+ {
+ write(pipe_thread[PIPE_WRITE], "X", 1);
+ pthread_join(thread_chat, NULL);
+
+ close(pipe_thread[PIPE_READ]);
+ close(pipe_thread[PIPE_WRITE]);
+
+ pipe_thread[PIPE_READ] = pipe_thread[PIPE_WRITE] = -1;
+ }
+
CChatUser *u = NULL;
CBuffer buf;
SendBuffer(&buf, CHAT_DISCONNECTION);
@@ -1923,17 +1935,6 @@
sockman.CloseSocket(chatServer.Descriptor(), false, false);
- // Close the chat thread
- if (pipe_thread[PIPE_WRITE] != -1)
- {
- write(pipe_thread[PIPE_WRITE], "X", 1);
- pthread_join(thread_chat, NULL);
-
- close(pipe_thread[PIPE_READ]);
- close(pipe_thread[PIPE_WRITE]);
-
- pipe_thread[PIPE_READ] = pipe_thread[PIPE_WRITE] = -1;
- }
}
_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx
_______________________________________________
Licq-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/licq-devel