projects
/
yazpp-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use m4/id-config.sh
[yazpp-moved-to-github.git]
/
src
/
yaz-pdu-assoc-thread.cpp
diff --git
a/src/yaz-pdu-assoc-thread.cpp
b/src/yaz-pdu-assoc-thread.cpp
index
23b9308
..
e13297e
100644
(file)
--- a/
src/yaz-pdu-assoc-thread.cpp
+++ b/
src/yaz-pdu-assoc-thread.cpp
@@
-1,10
+1,11
@@
-/*
- * Copyright (c) 1998-2004, Index Data.
+/* This file is part of the yazpp toolkit.
+ * Copyright (C) 1998-2012 Index Data and Mike Taylor
* See the file LICENSE for details.
* See the file LICENSE for details.
- *
- * $Id: yaz-pdu-assoc-thread.cpp,v 1.13 2005-10-10 15:59:43 adam Exp $
*/
*/
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
#ifdef WIN32
#define USE_THREADS 1
#endif
#ifdef WIN32
#define USE_THREADS 1
#endif
@@
-30,8
+31,8
@@
#include <yaz/log.h>
#include <yaz/tcpip.h>
#include <yaz/log.h>
#include <yaz/tcpip.h>
-#include <yaz++/pdu-assoc.h>
-#include <yaz++/socket-manager.h>
+#include <yazpp/pdu-assoc.h>
+#include <yazpp/socket-manager.h>
using namespace yazpp_1;
using namespace yazpp_1;
@@
-82,6
+83,14
@@
void PDU_AssocThread::childNotify(COMSTACK cs)
/// Clone PDU Observer
new_observable->m_PDU_Observer =
m_PDU_Observer->sessionNotify(new_observable, cs_fileno(cs));
/// Clone PDU Observer
new_observable->m_PDU_Observer =
m_PDU_Observer->sessionNotify(new_observable, cs_fileno(cs));
+
+ if (!new_observable->m_PDU_Observer)
+ {
+ new_observable->shutdown();
+ delete new_observable;
+ delete socket_observable;
+ return;
+ }
worker *w = new worker;
w->m_assoc = new_observable;
worker *w = new worker;
w->m_assoc = new_observable;
@@
-109,6
+118,7
@@
void PDU_AssocThread::childNotify(COMSTACK cs)
/*
* Local variables:
* c-basic-offset: 4
/*
* Local variables:
* c-basic-offset: 4
+ * c-file-style: "Stroustrup"
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab