Ignore:
Timestamp:
Oct 30, 2011, 9:14:19 PM (13 years ago)
Author:
djay
Message:

Fix download file for JS api. Decode value of Datainputs.

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

Legend:

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

    r307 r344  
    24792479    fsize=res.nDataLen;
    24802480  }
     2481  if(fsize==0){
     2482    return errorException(m, _("Unable to download the file."), "InternalError");
     2483  }
    24812484  map* tmpMap=getMapOrFill(content,"value","");
    24822485  free(tmpMap->value);
  • trunk/zoo-project/zoo-kernel/ulinet.c

    r274 r344  
    486486  size_t dwRead;
    487487  InternetReadFile(res,(LPVOID)tmpValue,res.nDataLen,&dwRead);
     488  fprintf(stderr,"content downloaded (%d) (%s) \n",dwRead,tmpValue);
     489  if(dwRead==0){
     490    JS_SET_RVAL(cx, argv1,STRING_TO_JSVAL(JS_NewStringCopyN(cx,"Unable to access the file.",strlen("Unable to access the file."))));
     491    return JS_TRUE;
     492  }
     493
    488494#ifdef ULINET_DEBUG
    489495  fprintf(stderr,"content downloaded (%d) (%s) \n",dwRead,tmpValue);
  • trunk/zoo-project/zoo-kernel/zoo_service_loader.c

    r342 r344  
    768768 
    769769  /**
    770    * Create the input maps data structure
     770   * Create the input and output maps data structure
    771771   */
    772772  int i=0;
     
    986986          }
    987987          tmpmaps->name=strdup(tmpn);
    988           if(tmpv!=NULL)
    989             tmpmaps->content=createMap("value",tmpv+1);
     988          if(tmpv!=NULL){
     989            char *tmpvf=url_decode(tmpv+1);
     990            tmpmaps->content=createMap("value",tmpvf);
     991            free(tmpvf);
     992          }
    990993          else
    991994            tmpmaps->content=createMap("value","Reference");
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