[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/rtmp r10021: get the root directory for cg
From: |
rob |
Subject: |
[Gnash-commit] /srv/bzr/gnash/rtmp r10021: get the root directory for cgi-bins. |
Date: |
Mon, 16 Mar 2009 16:44:59 -0600 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 10021
committer: address@hidden
branch nick: rtmp
timestamp: Mon 2009-03-16 16:44:59 -0600
message:
get the root directory for cgi-bins.
modified:
cygnal/proc.cpp
=== modified file 'cygnal/proc.cpp'
--- a/cygnal/proc.cpp 2009-02-22 00:41:45 +0000
+++ b/cygnal/proc.cpp 2009-03-16 22:44:59 +0000
@@ -28,16 +28,18 @@
#include <cstdlib>
#include "log.h"
+#include "crc.h"
#include "proc.h"
#include "network.h"
using namespace std;
using namespace gnash;
+namespace cygnal
+{
+
LogFile& dbglogfile = LogFile::getDefaultInstance();
-
-namespace cygnal
-{
+static CRcInitFile& crcfile = CRcInitFile::getDefaultInstance();
Proc::Proc (void)
{
@@ -97,15 +99,23 @@
_output[filespec] = outflag;
- string path = getDocroot();
+ string path;
+ if (crcfile.getCgiRoot().size() > 0) {
+ path = crcfile.getCgiRoot().c_str();
+ log_debug (_("Document Root for CGI files is: %s"), path);
+ } else {
+ // Yes, I know this is a hack.
+ path = "/var/www/html/cygnal/cgi-bin";
+ }
+// string path = filespec;
path += filespec;
// simple debug junk
- log_debug("Starting \"%s\"", filespec);
+ log_debug("Starting \"%s\"", path);
// See if the file actually exists, otherwise we can't spawn it
if (stat(path.c_str(), &procstats) == -1) {
- log_error("Invalid filename \"%s\"", path);
+ log_error("Invalid filespec for CGI: \"%s\"", path);
// perror(filespec.c_str());
return (false);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/rtmp r10021: get the root directory for cgi-bins.,
rob <=