https://issues.shibboleth.net/jira/browse/SSPCPP-277
authorScott Cantor <cantor.2@osu.edu>
Thu, 21 Jan 2010 16:48:57 +0000 (16:48 +0000)
committerScott Cantor <cantor.2@osu.edu>
Thu, 21 Jan 2010 16:48:57 +0000 (16:48 +0000)
.cproject
schemas/shibboleth-2.0-native-sp-config.xsd
shibsp/remoting/impl/SocketListener.cpp
shibsp/remoting/impl/SocketListener.h

index 7496270..83c8f62 100644 (file)
--- a/.cproject
+++ b/.cproject
@@ -51,6 +51,7 @@
 <listOptionValue builtIn="false" value="SHIBSP_API"/>\r
 <listOptionValue builtIn="false" value="SHIBSP_DLLLOCAL"/>\r
 <listOptionValue builtIn="false" value="SHIBSP_LOGCAT=&quot;Shibboleth&quot;"/>\r
+<listOptionValue builtIn="false" value="WIN32"/>\r
 </option>\r
 <option id="org.eclipse.linuxtools.cdt.autotools.option.configure.includes.1925509387" name="includes" superClass="org.eclipse.linuxtools.cdt.autotools.option.configure.includes" valueType="includePath">\r
 <listOptionValue builtIn="false" value="&quot;${workspace_loc:/cpp-sp/cpp-xmltooling}&quot;"/>\r
index 7b54585..310505e 100644 (file)
@@ -8,7 +8,7 @@
        elementFormDefault="qualified"
        attributeFormDefault="unqualified"
        blockDefault="substitution"
-       version="2.3">
+       version="2.4">
 
        <import namespace="urn:oasis:names:tc:SAML:2.0:assertion" schemaLocation="saml-schema-assertion-2.0.xsd"/>
        <import namespace="urn:oasis:names:tc:SAML:2.0:protocol" schemaLocation="saml-schema-protocol-2.0.xsd"/>
@@ -65,6 +65,7 @@
                     <element name="UnixListener">
                         <complexType>
                             <attribute name="address" type="conf:string" use="required"/>
+                            <attribute name="stackSize" type="unsignedInt"/>
                         </complexType>
                     </element>
                     <element name="TCPListener">
@@ -72,6 +73,7 @@
                             <attribute name="address" type="conf:string" use="required"/>
                             <attribute name="port" type="unsignedInt" use="required"/>
                             <attribute name="acl" type="conf:listOfStrings"/>
+                            <attribute name="stackSize" type="unsignedInt"/>
                         </complexType>
                     </element>
                     <element name="Listener" type="conf:PluggableType"/>
index edac04f..f588bea 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright 2001-2009 Internet2
+ *  Copyright 2001-2010 Internet2
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -17,7 +17,7 @@
 /**
  * SocketListener.cpp
  *
- * Berkeley Socket-based ListenerService implementation
+ * Berkeley Socket-based ListenerService implementation.
  */
 
 #include "internal.h"
@@ -160,7 +160,7 @@ void SocketPool::put(SocketListener::ShibSocket s)
 
 SocketListener::SocketListener(const DOMElement* e)
     : m_catchAll(false), log(&Category::getInstance(SHIBSP_LOGCAT".Listener")), m_socketpool(NULL),
-        m_shutdown(NULL), m_child_lock(NULL), m_child_wait(NULL), m_socket((ShibSocket)0)
+        m_shutdown(NULL), m_child_lock(NULL), m_child_wait(NULL), m_stackSize(0), m_socket((ShibSocket)0)
 {
     // Are we a client?
     if (SPConfig::getConfig().isEnabled(SPConfig::InProcess)) {
@@ -170,6 +170,11 @@ SocketListener::SocketListener(const DOMElement* e)
     if (SPConfig::getConfig().isEnabled(SPConfig::OutOfProcess)) {
         m_child_lock = Mutex::create();
         m_child_wait = CondWait::create();
+
+        static const XMLCh stackSize[] = UNICODE_LITERAL_9(s,t,a,c,k,S,i,z,e);
+        const XMLCh* attr = e ? e->getAttributeNS(NULL, stackSize) : NULL;
+        if (attr && *attr)
+            m_stackSize = XMLString::parseInt(attr);
     }
 }
 
@@ -426,7 +431,7 @@ ServerThread::ServerThread(SocketListener::ShibSocket& s, SocketListener* listen
     m_id = buf.str();
 
     // Create the child thread
-    m_child = Thread::create(server_thread_fn, (void*)this);
+    m_child = Thread::create(server_thread_fn, (void*)this, m_listener->m_stackSize);
     m_child->detach();
 }
 
index a558650..d6ed828 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright 2001-2009 Internet2
+ *  Copyright 2001-2010 Internet2
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -17,7 +17,7 @@
 /**
  * SocketListener.h
  *
- * Berkeley Socket-based ListenerService implementation
+ * Berkeley Socket-based ListenerService implementation.
  */
 
 #ifndef __shibsp_socklisten_h__
@@ -88,6 +88,8 @@ namespace shibsp {
         xmltooling::Mutex* m_child_lock;
         xmltooling::CondWait* m_child_wait;
 
+        unsigned int m_stackSize;
+
         // Primary socket
         ShibSocket m_socket;
     };