Ignore:
Timestamp:
Jun 3, 2014, 4:58:44 PM (10 years ago)
Author:
djay
Message:

Add support of maximumMegabytes keyword for size limitation of ComplexData? inputs

File:
1 edited

Legend:

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

    r483 r485  
    21592159   */
    21602160  char *dfv=addDefaultValues(&request_input_real_format,s1->inputs,m,0);
     2161  maps *ptr=request_input_real_format;
     2162  while(ptr!=NULL){
     2163    dumpMap(ptr->content);
     2164    map *tmp0=getMap(ptr->content,"size");
     2165    map *tmp1=getMap(ptr->content,"maximumMegabytes");
     2166    if(tmp1!=NULL && tmp0!=NULL){
     2167      float i=atof(tmp0->value)/1048576.0;
     2168      if(i>=atoi(tmp1->value)){
     2169        char tmps[1024];
     2170        map* tmpe=createMap("code","FileSizeExceeded");
     2171        snprintf(tmps,1024,_("The <%s> parameter has a limited size (%sMB) defined in ZOO ServicesProvider configuration file but the reference you provided exceed this limitation (%dMB), please correct your query or the ZOO Configuration file."),ptr->name,tmp1->value,i);
     2172        addToMap(tmpe,"locator",ptr->name);
     2173        addToMap(tmpe,"text",tmps);
     2174        printExceptionReportResponse(m,tmpe);
     2175        freeService(&s1);
     2176        free(s1);
     2177        freeMap(&tmpe);
     2178        free(tmpe);
     2179        freeMaps(&m);
     2180        free(m);
     2181        free(REQUEST);
     2182        free(SERVICE_URL);
     2183        freeMaps(&request_input_real_format);
     2184        free(request_input_real_format);
     2185        freeMaps(&request_output_real_format);
     2186        free(request_output_real_format);
     2187        freeMaps(&tmpmaps);
     2188        free(tmpmaps);
     2189        return 1;
     2190      }
     2191    }
     2192    ptr=ptr->next;
     2193  }
     2194
    21612195  char *dfv1=addDefaultValues(&request_output_real_format,s1->outputs,m,1);
    21622196  if(strcmp(dfv1,"")!=0 || strcmp(dfv,"")!=0){
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