//
// 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
//
// 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$
#include <stdlib.h> // atoi() atof()
#include STL_STRING
-#include STL_STRSTREAM
#include <simgear/debug/logstream.hxx>
#include <simgear/io/iochannel.hxx>
#include <simgear/math/sg_types.hxx>
-#include <simgear/misc/commands.hxx>
+#include <simgear/structure/commands.hxx>
#include <simgear/props/props.hxx>
#include <Main/fg_props.hxx>
SG_USING_STD(string);
SG_USING_STD(cout);
-SG_USING_STD(istrstream);
bool FGHttpd::open() {
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;
}
if ( child->nChildren() > 0 ) {
line += "<B><A HREF=\"";
line += request;
- if ( request.substr(request.length() - 1, 1) != (string)"/" ) {
+ if ( request.substr(request.length() - 1, 1) != "/" ) {
line += "/";
}
line += urlEncode(name);
line += name;
line += "</B> <A HREF=\"";
line += request;
- if ( request.substr(request.length() - 1, 1) != (string)"/" ) {
+ if ( request.substr(request.length() - 1, 1) != "/" ) {
line += "/";
}
line += urlEncode(name);