Changeset 254


Ignore:
Timestamp:
Jun 30, 2011, 1:01:25 AM (13 years ago)
Author:
djay
Message:

Fixing session storage for fastcgi.

Location:
trunk/zoo-kernel
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/zoo-kernel/service.h

    r253 r254  
    124124    map* tmp=t;
    125125    while(tmp!=NULL){
     126      fprintf(stderr,"%s = %s\n",tmp->name,tmp->value);
    126127      fprintf(file,"%s = %s\n",tmp->name,tmp->value);
    127128      tmp=tmp->next;
     
    138139  }
    139140
    140   static void dumpMapsToFile(maps* m,FILE* file){
     141  static void dumpMapsToFile(maps* m,char* file_path){
     142    FILE* file=fopen(file_path,"w");
    141143    maps* tmp=m;
    142144    if(tmp!=NULL){
    143145      fprintf(file,"[%s]\n",tmp->name);
    144146      dumpMapToFile(tmp->content,file);
    145     }
     147      fflush(file);
     148    }
     149    fclose(file);
    146150  }
    147151
  • trunk/zoo-kernel/service_internal.c

    r216 r254  
    17221722      else
    17231723        sprintf(session_file_path,"%s/sess_%s.cfg",tmpPath->value,strstr(_tmp->value,"=")+1);
    1724       FILE* file=fopen(session_file_path,"w");
    1725       dumpMapsToFile(tmpSess,file);
    1726       fclose(file);
     1724      dumpMapsToFile(tmpSess,session_file_path);
    17271725    }
    17281726  }
  • trunk/zoo-kernel/zoo_service_loader.c

    r253 r254  
    18211821    struct stat file_status;
    18221822    int istat = stat(session_file_path, &file_status);
    1823     if(istat==0){
     1823    if(istat==0 && file_status.st_size>0){
    18241824      conf_read(session_file_path,tmpSess);
    18251825      dumpMaps(tmpSess);
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