Changeset 623


Ignore:
Timestamp:
Apr 9, 2015, 6:33:14 PM (6 years ago)
Author:
djay
Message:

Fix issue when adding map with size in a map array.

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

Legend:

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

    r622 r623  
    292292                  }
    293293                else
    294                   addMapsToMaps (&(*request_output), tmpmaps);
     294                  addMapsToMaps (request_output, tmpmaps);
    295295              }
    296296            freeMaps (&tmpmaps);
     
    403403            *request_output = dupMaps (&tmp_output);
    404404          else
    405             addMapsToMaps (&(*request_output), tmp_output);
     405            addMapsToMaps (request_output, tmp_output);
    406406          freeMaps (&tmp_output);
    407407          free (tmp_output);
     
    530530                                {
    531531                                  if (loadRemoteFile
    532                                       (&(*main_conf), &tmpmaps->content, hInternet,
     532                                      (main_conf, &tmpmaps->content, hInternet,
    533533                                       (char *) val) != 0)
    534534                                    {
     
    647647                                      if (btmp != NULL)
    648648                                        {
    649                                           addRequestToQueue(&(*main_conf),hInternet,(char *) btmp->value,false);
     649                                          addRequestToQueue(main_conf,hInternet,(char *) btmp->value,false);
    650650                                          InternetOpenUrl (hInternet,
    651651                                                           btmp->value,
     
    714714                                if (btmp != NULL)
    715715                                  {
    716                                     addRequestToQueue(&(*main_conf),hInternet,(char *) btmp->value,false);
     716                                    addRequestToQueue(main_conf,hInternet,(char *) btmp->value,false);
    717717
    718718                                    res =
     
    939939              }
    940940            else
    941               addMapsToMaps (&(*request_output), tmpmaps);
     941              addMapsToMaps (request_output, tmpmaps);
    942942          }
    943943          freeMaps (&tmpmaps);
     
    10211021            *request_output = dupMaps (&tmpmaps);
    10221022          else
    1023             addMapsToMaps (&(*request_output), tmpmaps);
     1023            addMapsToMaps (request_output, tmpmaps);
    10241024          if (tmpmaps != NULL)
    10251025            {
  • trunk/zoo-project/zoo-kernel/service.h

    r621 r623  
    653653      }
    654654    }
     655    char sname[10]="size";
     656    if(strlen(n)>5)
     657      sprintf(sname,"size_%s",n+6);
    655658    map *tmp=getMap(m,n);
    656659    if(tmp->value!=NULL)
     
    661664    char sin[128];
    662665    sprintf(sin,"%d",size);
    663     addToMap(m,"size",sin);
     666    addToMap(m,sname,sin);
    664667  }
    665668
  • trunk/zoo-project/zoo-kernel/service_internal.c

    r621 r623  
    37043704void addRequestToQueue(maps** m,HINTERNET* hInternet,const char* url,bool req){
    37053705  hInternet->waitingRequests[hInternet->nb]=strdup(url);
     3706  hInternet->ihandle[hInternet->nb].header=NULL;
    37063707  if(req)
    37073708    InternetOpenUrl(hInternet,hInternet->waitingRequests[hInternet->nb],NULL,0,INTERNET_FLAG_NO_CACHE_WRITE,0);
  • trunk/zoo-project/zoo-kernel/service_internal_ms.c

    r607 r623  
    430430  char *odsName=zStrdup(pszDataSource);
    431431  char *sdsName=zStrdup(pszDataSource);
    432   char *demo=strstr(odsName,".");
     432  char *demo=".data";
    433433  sdsName[strlen(sdsName)-(strlen(demo)-1)]='d';
    434434  sdsName[strlen(sdsName)-(strlen(demo)-2)]='i';
  • trunk/zoo-project/zoo-kernel/service_internal_python.c

    r581 r623  
    581581#endif
    582582   
    583     if(strcmp(PyString_AsString(key),"value")==0){
     583    if(strncmp(PyString_AsString(key),"value",5)==0){
    584584      char *buffer=NULL;
    585585      Py_ssize_t size;
     
    589589      PyString_AsStringAndSize(value,&buffer,&size);
    590590#endif
    591       addToMapWithSize(res,"value",buffer,size);
     591      addToMapWithSize(res,PyString_AsString(key),buffer,size);
    592592    }else{
    593593      char* lkey=PyString_AsString(key);
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