]> git.mxchange.org Git - flightgear.git/blobdiff - src/Network/httpd.cxx
fix another crash on exit by finally converting the rest of unguarded
[flightgear.git] / src / Network / httpd.cxx
index 318c69f2a592f4da229a56e22f26180c4c469a96..e188b490934b6cbe41cb04c512fff3153e45a282 100644 (file)
@@ -3,7 +3,7 @@
 //
 // Written by Curtis Olson, started June 2001.
 //
-// Copyright (C) 2001  Curtis L. Olson - curt@flightgear.org
+// Copyright (C) 2001  Curtis L. Olson - http://www.flightgear.org/~curt
 //
 // Jpeg Image Support added August 2001
 //  by Norman Vine - nhv@cape.com
@@ -20,7 +20,7 @@
 //
 // You should have received a copy of the GNU General Public License
 // along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //
 // $Id$
 
@@ -34,7 +34,6 @@
 #include <stdlib.h>            // atoi() atof()
 
 #include STL_STRING
-#include STL_STRSTREAM
 
 #include <simgear/debug/logstream.hxx>
 #include <simgear/io/iochannel.hxx>
@@ -49,7 +48,6 @@
 
 SG_USING_STD(string);
 SG_USING_STD(cout);
-SG_USING_STD(istrstream);
 
 
 bool FGHttpd::open() {
@@ -76,7 +74,12 @@ bool FGHttpd::process() {
 
 
 bool FGHttpd::close() {
-    delete server;
+    SG_LOG( SG_IO, SG_INFO, "closing FGHttpd" );   
+
+    // the following delete causes a seg fault, gdb is not helpful.
+    // delete server;
+
+    set_enabled( false );
 
     return true;
 }