Changeset 511


Ignore:
Timestamp:
Oct 22, 2014, 7:34:22 PM (10 years ago)
Author:
david
Message:
  • Move main function form cgic.c to zoo_loader.c to prepare zoo threading version
  • Add cgiMain_init function to load cgi environment
Location:
branches/PublicaMundi_David-devel/thirds/cgic206
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/PublicaMundi_David-devel/thirds/cgic206/cgic.c

    r379 r511  
    123123static cgiParseResultType cgiParseFormInput(char *data, int length);
    124124static void cgiSetupConstants();
    125 static void cgiFreeResources();
     125void cgiFreeResources();
    126126static int cgiStrEqNc(char *s1, char *s2);
    127127static int cgiStrBeginsNc(char *s1, char *s2);
     
    130130
    131131
    132 int main(int argc, char *argv[]) {
     132int cgiMain_init(int argc, char *argv[]) {
    133133        int result;
    134134        char *cgiContentLengthString;
    135135        char *e;
    136         while (FCGI_Accept() >= 0) {
    137136        cgiSetupConstants();
    138137        cgiGetenv(&cgiServerSoftware, "SERVER_SOFTWARE");
     
    310309                }
    311310        }
    312         result = cgiMain();
    313         cgiFreeResources();
    314         }
    315         FCGI_Finish();
    316311        return result;
    317312}
     
    11771172}
    11781173
    1179 static void cgiFreeResources() {
     1174void cgiFreeResources() {
    11801175        cgiFormEntry *c = cgiFormEntryFirst;
    11811176        cgiFormEntry *n;
  • branches/PublicaMundi_David-devel/thirds/cgic206/cgic.h

    r348 r511  
    415415int cgiMain();
    416416extern
    417 #ifdef __cplusplus
    418 "C"
    419 #endif
    420 int cgiMain_init();
    421 
    422 
    423 extern
     417
     418
    424419#ifdef __cplusplus
    425420"C"
     
    454449cgiFormResultType cgiValueEscapeData(char *data, int len);
    455450
     451int cgiMain_init(int argc, char *argv[]);
     452
     453void cgiFreeResources();
     454
    456455#endif /* CGI_C */
    457456
Note: See TracChangeset for help on using the changeset viewer.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png