*
*/
#ifndef lint
-static const char rcsid[] = "$Id: fcgiapp.c,v 1.11 1999/08/10 22:27:12 roberts Exp $";
+static const char rcsid[] = "$Id: fcgiapp.c,v 1.12 1999/08/14 21:20:56 roberts Exp $";
#endif /* not lint */
#include "fcgi_config.h"
static int libInitialized = 0;
static int isFastCGI = -1;
static char *webServerAddressList = NULL;
-static FCGX_Request reqData;
-static FCGX_Request *reqDataPtr = &reqData;
+static FCGX_Request the_request;
static void *Malloc(size_t size)
{
void FCGX_Finish(void)
{
- FCGX_Finish_r(reqDataPtr);
+ FCGX_Finish_r(&the_request);
}
/*
/* If our compiler doesn't play by the ISO rules for struct layout, halt. */
ASSERT(sizeof(FCGI_Header) == FCGI_HEADER_LEN);
- FCGX_InitRequest(&reqData, FCGI_LISTENSOCK_FILENO, 0);
+ FCGX_InitRequest(&the_request, FCGI_LISTENSOCK_FILENO, 0);
if (OS_LibInit(NULL) == -1) {
return OS_Errno ? OS_Errno : -9997;
}
p = getenv("FCGI_WEB_SERVER_ADDRS");
- webServerAddressList = p ? StringCopy(p) : "";
+ webServerAddressList = p ? StringCopy(p) : NULL;
libInitialized = 1;
return 0;
}
}
- rc = FCGX_Accept_r(&reqData);
+ rc = FCGX_Accept_r(&the_request);
- *in = reqData.in;
- *out = reqData.out;
- *err = reqData.err;
- *envp = reqData.envp;
+ *in = the_request.in;
+ *out = the_request.out;
+ *err = the_request.err;
+ *envp = the_request.envp;
return rc;
}
SetError(stream, FCGX_CALL_SEQ_ERROR);
return -1;
}
- SetReaderType(reqDataPtr->in, FCGI_DATA);
+ SetReaderType(stream, FCGI_DATA);
return 0;
}
\f