projects
/
yazproxy-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add support for thread config element which specifies number of
[yazproxy-moved-to-github.git]
/
src
/
t-server.cpp
diff --git
a/src/t-server.cpp
b/src/t-server.cpp
index
ad88d02
..
e91049b
100644
(file)
--- a/
src/t-server.cpp
+++ b/
src/t-server.cpp
@@
-1,8
+1,8
@@
/*
/*
- * Copyright (c) 1998-2005, Index Data.
+ * Copyright (c) 2005, Index Data.
* See the file LICENSE for details.
*
* See the file LICENSE for details.
*
- * $Id: t-server.cpp,v 1.4 2005-09-12 20:09:14 adam Exp $
+ * $Id: t-server.cpp,v 1.9 2006-03-30 14:19:19 adam Exp $
*/
#include <stdlib.h>
*/
#include <stdlib.h>
@@
-11,10
+11,15
@@
#include <yaz/diagbib1.h>
#include <yaz/options.h>
#include "msg-thread.h"
#include <yaz/diagbib1.h>
#include <yaz/options.h>
#include "msg-thread.h"
-#include <yaz++/z-assoc.h>
-#include <yaz++/pdu-assoc.h>
-#include <yaz++/gdu.h>
-#include <yaz++/socket-manager.h>
+#include <yazpp/z-assoc.h>
+#include <yazpp/pdu-assoc.h>
+#include <yazpp/gdu.h>
+#include <yazpp/gduqueue.h>
+#include <yazpp/socket-manager.h>
+
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
using namespace yazpp_1;
using namespace yazpp_1;
@@
-58,11
+63,18
@@
IMsg_Thread *Auth_Msg::handle()
{
case Z_APDU_initRequest:
apdu = zget_APDU(odr, Z_APDU_initResponse);
{
case Z_APDU_initRequest:
apdu = zget_APDU(odr, Z_APDU_initResponse);
+ ODR_MASK_SET(apdu->u.initResponse->options, Z_Options_triggerResourceCtrl);
+ ODR_MASK_SET(apdu->u.initResponse->options, Z_Options_search);
+ ODR_MASK_SET(apdu->u.initResponse->options, Z_Options_present);
break;
case Z_APDU_searchRequest:
break;
case Z_APDU_searchRequest:
+#if HAVE_UNISTD_H
sleep(5);
sleep(5);
+#endif
apdu = zget_APDU(odr, Z_APDU_searchResponse);
break;
apdu = zget_APDU(odr, Z_APDU_searchResponse);
break;
+ case Z_APDU_triggerResourceControlRequest:
+ break;
default:
apdu = zget_APDU(odr, Z_APDU_close);
m_close_flag = 1;
default:
apdu = zget_APDU(odr, Z_APDU_close);
m_close_flag = 1;
@@
-116,6
+128,7
@@
void Auth_Msg::result()
}
if (m_front->m_delete_flag && m_front->m_no_requests == 0)
delete m_front;
}
if (m_front->m_delete_flag && m_front->m_no_requests == 0)
delete m_front;
+ delete this;
}
MyServer::MyServer(IPDU_Observable *the_PDU_Observable,
}
MyServer::MyServer(IPDU_Observable *the_PDU_Observable,