Added proper memory scheme for authentication handler module.
[yazproxy-moved-to-github.git] / src / msg-thread.cpp
index 3315e26..af65ece 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: msg-thread.cpp,v 1.1 2005-05-30 20:08:58 adam Exp $
+/* $Id: msg-thread.cpp,v 1.4 2005-06-10 22:54:22 adam Exp $
    Copyright (c) 1998-2005, Index Data.
 
 This file is part of the yaz-proxy.
@@ -21,12 +21,15 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #include <pthread.h>
 #include <unistd.h>
 #include <ctype.h>
+#include <stdio.h>
 
 #include <yaz++/socket-observer.h>
 #include <yaz/log.h>
 
 #include "msg-thread.h"
 
+using namespace yazpp_1;
+
 Msg_Thread_Queue::Msg_Thread_Queue()
 {
     m_list = 0;
@@ -70,12 +73,12 @@ static void *tfunc(void *p)
 }
 
 
-Msg_Thread::Msg_Thread(IYazSocketObservable *obs)
+Msg_Thread::Msg_Thread(ISocketObservable *obs)
     : m_SocketObservable(obs)
 {
     pipe(m_fd);
     obs->addObserver(m_fd[0], this);
-    obs->maskObserver(this, YAZ_SOCKET_OBSERVE_READ);
+    obs->maskObserver(this, SOCKET_OBSERVE_READ);
 
     m_stop_flag = false;
     pthread_mutex_init(&m_mutex_input_data, 0);
@@ -106,7 +109,7 @@ Msg_Thread::~Msg_Thread()
 
 void Msg_Thread::socketNotify(int event)
 {
-    if (event & YAZ_SOCKET_OBSERVE_READ)
+    if (event & SOCKET_OBSERVE_READ)
     {
        char buf[2];
        read(m_fd[0], buf, 1);