Changeset 633


Ignore:
Timestamp:
Apr 16, 2015, 4:01:40 AM (10 years ago)
Author:
djay
Message:

Call readGeneratedFile even if asReference parameter was set to false.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/zoo-project/zoo-kernel/service_internal.c

    r631 r633  
    26602660  free(tmpMap1->value);
    26612661  tmpMap1->value=(char*) malloc((count+1)*sizeof(char)); 
    2662   fread(tmpMap1->value,1,count*sizeof(char),file);
     2662  fread(tmpMap1->value,count,sizeof(char),file);
    26632663  fclose(file);
    26642664  char rsize[100];
    2665   sprintf(rsize,"%ld",count*sizeof(char));
    2666   addToMap(tmpMap1,"size",rsize);
     2665  sprintf(rsize,"%ld",count);
     2666  addToMap(content,"size",rsize);
    26672667}
    26682668
     
    27642764      map* testMap=getMap(tmpI->content,"useMapserver");       
    27652765#endif
     2766      map *gfile=getMap(tmpI->content,"generated_file");
     2767      char *file_name;
     2768      if(gfile!=NULL){
     2769        gfile=getMap(tmpI->content,"expected_generated_file");
     2770        if(gfile==NULL){
     2771          gfile=getMap(tmpI->content,"generated_file");
     2772        }
     2773        readGeneratedFile(m,tmpI->content,gfile->value);           
     2774        file_name=(char*)malloc((strlen(gfile->value)+strlen(tmp1->value)+1)*sizeof(char));
     2775        for(int i=0;i<strlen(gfile->value);i++)
     2776          file_name[i]=gfile->value[i+strlen(tmp1->value)];
     2777      }
     2778
    27662779      toto=getMap(tmpI->content,"asReference");
    27672780#ifdef USE_MS
     
    27842797          }
    27852798
    2786           map *gfile=getMap(tmpI->content,"generated_file");
    2787           char *file_name;
    2788           if(gfile!=NULL){
    2789             gfile=getMap(tmpI->content,"expected_generated_file");
    2790             if(gfile==NULL){
    2791               gfile=getMap(tmpI->content,"generated_file");
    2792             }
    2793             readGeneratedFile(m,tmpI->content,gfile->value);       
    2794             file_name=(char*)malloc((strlen(gfile->value)+strlen(tmp1->value)+1)*sizeof(char));
    2795             for(int i=0;i<strlen(gfile->value);i++)
    2796               file_name[i]=gfile->value[i+strlen(tmp1->value)];
    2797           }
    2798           else{
     2799          if(gfile==NULL){
    27992800            map *ext=getMap(tmpI->content,"extension");
    28002801            char *file_path;
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