Ignore:
Timestamp:
Jan 10, 2013, 3:39:16 AM (7 years ago)
Author:
djay
Message:

Add QREncode service. Fix memory leaks. Avoid printing anything from the conf_read function to be able to detect and return valid headers.

Location:
trunk/zoo-project/zoo-kernel
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/zoo-project/zoo-kernel/main_conf_read.y

    r225 r385  
    314314  crin = fopen(file,"r");
    315315  if (crin==NULL){
    316     printf("error : le fichier specifie n'existe pas ou n'est pas accessible en lecture\n") ;
    317316    return 2 ;
    318317  }
  • trunk/zoo-project/zoo-kernel/service_internal.c

    r384 r385  
    17461746      printf("Content-Type: text/xml; charset=%s\r\nStatus: 200 OK\r\n\r\n",encoding);
    17471747    }
    1748   }else
     1748  }else{
    17491749    printf("Content-Type: text/xml; charset=%s\r\nStatus: 200 OK\r\n\r\n",encoding);
     1750  }
    17501751  n=createExceptionReportNode(m,s,1);
    17511752  xmlDocSetRootElement(doc, n);
     
    20162017        printf("%s",mime);
    20172018        if(rs!=NULL)
    2018           fwrite(toto->value,atoi(rs->value),1,stdout);
     2019          fwrite(toto->value,1,atoi(rs->value),stdout);
    20192020        else
    2020           fwrite(toto->value,strlen(toto->value),1,stdout);
     2021          fwrite(toto->value,1,strlen(toto->value),stdout);
    20212022#ifdef DEBUG
    20222023        dumpMap(toto);
  • trunk/zoo-project/zoo-kernel/zoo_service_loader.c

    r384 r385  
    561561  char conf_file[10240];
    562562  snprintf(conf_file,10240,"%s/%s/main.cfg",ntmp,r_inputs->value);
    563   conf_read(conf_file,m);
     563  if(conf_read(conf_file,m)==2){
     564    errorException(NULL, _("Unable to load the main.cfg file."),"InternalError");
     565    free(m);
     566    return 1;
     567  }
    564568#ifdef DEBUG
    565569  fprintf(stderr, "***** BEGIN MAPS\n");
     
    635639    freeMap(&request_inputs);
    636640    free(request_inputs);
    637     free(REQUEST);
    638641    return 1;
    639642  }
     
    838841      free(SERVICE_URL);
    839842      fflush(stdout);
    840 #ifndef LINUX_FREE_ISSUE
    841       if(s1)
    842         free(s1);
    843 #endif
    844843      return 0;
    845844    }
     
    851850#endif 
    852851        closedir(dirp);
     852        freeMaps(&m);
     853        free(m);
     854        free(REQUEST);
     855        free(SERVICE_URL);
     856        fflush(stdout);
    853857        return 0;
    854858      }
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