Changeset 653


Ignore:
Timestamp:
Jun 12, 2015, 1:12:32 PM (5 years ago)
Author:
djay
Message:

Small fixes for building on GNU/Linux.

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

Legend:

Unmodified
Added
Removed
  • trunk/zoo-project/zoo-kernel/Makefile.in

    r652 r653  
    107107        install -d ${CGI_DIR}
    108108        install zoo_loader.cgi ${CGI_DIR}/
    109         install libzoo_service.${EXT} ${DESTDIR}${INST_LIB}/libzoo_service.${VERSION}.${REVISION}.${EXT}
     109        install libzoo_service.${EXT} ${DESTDIR}${INST_LIB}/${LIBZOO_SERVICE}
    110110        (cd ${DESTDIR}${INST_LIB} ; \
    111111         if [ -e "libzoo_service.${EXT}" ]; then rm  libzoo_service.${EXT}; fi ; \
    112          ln -s libzoo_service.${VERSION}.${REVISION}.${EXT} libzoo_service.${EXT})
     112         ln -s ${LIBZOO_SERVICE} libzoo_service.${EXT})
    113113        install -d ${DESTDIR}${INST_INCLUDE}/zoo
    114114        install service.h service_internal.h ${DESTDIR}${INST_INCLUDE}/zoo
  • trunk/zoo-project/zoo-kernel/ZOOMakefile.opts.in

    r652 r653  
    1515        EXT=dylib
    1616        DEFAULT_OPTS=-Wl,-compatibility_version,${VERSION},-current_version,${VERSION},-install_name,${DESTDIR}${INST_LIB}/libzoo_service.${VERSION}.${REVISION}.dylib
     17        LIBZOO_SERVICE=libzoo_service.${VERSION}.${REVISION}.${EXT}
     18else
     19        LIBZOO_SERVICE=libzoo_service.${EXT}.${VERSION}
    1720endif
    1821
  • trunk/zoo-project/zoo-kernel/server_internal.c

    r652 r653  
    3131#include <uuid/uuid.h>
    3232
     33/**
     34 * Detect WPS version used (1.0.0 or 2.0.0).
     35 *
     36 * @param version number as char* (1.0.0 or 2.0.0)
     37 * @return 0 in case of version 1.0.0, 1 for 2.0.0, -1 in other case
     38 */
    3339int getVersionId(const char* version){
    3440  int schemaId=0;
     
    3743      return schemaId;
    3844  }
    39   return 0;
     45  return -1;
    4046}
    4147
     
    5157  uuid_t uuid;
    5258  uuid_generate_time(uuid);
    53   char * rest;
     59  char rest[128];
    5460  uuid_unparse(uuid,rest);
    5561  sprintf(res,"%s", rest);
  • trunk/zoo-project/zoo-kernel/service_internal.c

    r652 r653  
    5757  FILE* f0 = fopen (fbkpid, "r");
    5858  if(f0!=NULL){
     59    long flen;
     60    char *fcontent;
    5961    fseek (f0, 0, SEEK_END);
    60     long flen = ftell (f0);
     62    flen = ftell (f0);
    6163    fseek (f0, 0, SEEK_SET);
    62     char *tmps1 = (char *) malloc ((flen + 1) * sizeof (char));
    63     fread(tmps1,flen,1,f0);
    64     tmps1[flen]=0;
     64    fcontent = (char *) malloc ((flen + 1) * sizeof (char));
     65    fread(fcontent,flen,1,f0);
     66    fcontent[flen]=0;
    6567    fclose(f0);
    66     return tmps1;
     68    return fcontent;
    6769  }else
    6870    return NULL;
     
    188190  FILE* f0 = fopen (fbkpid, "r");
    189191  if(f0!=NULL){
    190     char* stat=getStatusId(conf,lid);
     192    semid lockid;
     193    char* stat;
     194    long flen;
     195    stat=getStatusId(conf,lid);
    191196    if(stat!=NULL){
    192197      setMapInMaps(conf,"lenv","lid",stat);
    193       semid lockid=acquireLock(conf);
     198      lockid=acquireLock(conf);
    194199      if(lockid<0)
    195200        return NULL;
    196201    }
    197202    fseek (f0, 0, SEEK_END);
    198     long flen = ftell (f0);
     203    flen = ftell (f0);
    199204    if(flen>0){
     205      char *fcontent;
    200206      fseek (f0, 0, SEEK_SET);
    201       char *tmps1 = (char *) malloc ((flen + 1) * sizeof (char));
    202       fread(tmps1,flen,1,f0);
    203       tmps1[flen]=0;
     207      fcontent = (char *) malloc ((flen + 1) * sizeof (char));
     208      fread(fcontent,flen,1,f0);
     209      fcontent[flen]=0;
    204210      fclose(f0);
    205211      free(fbkpid);
     
    208214        free(stat);
    209215      }
    210       return tmps1;
     216      return fcontent;
    211217    }
    212218    fclose(f0);
  • trunk/zoo-project/zoo-kernel/service_internal_saga.c

    r652 r653  
    138138    case CALLBACK_DLG_CONTINUE:
    139139    case CALLBACK_PROCESS_SET_READY:
     140    case CALLBACK_PROCESS_GET_OKAY:
     141      return res;
    140142      break;
    141143
     
    145147        if( cPercent != status ){
    146148          status=cPercent;
    147         }
    148       }
    149       break;
    150 
    151     case CALLBACK_PROCESS_GET_OKAY:
    152       status=1;
     149        }else
     150          return res;
     151      }
    153152      break;
    154153
     
    178177      else
    179178        res = 0;
     179      return res;
    180180      break;
    181181
  • trunk/zoo-project/zoo-kernel/sqlapi.h

    r652 r653  
    3838  void recordStoredFile(maps*,const char*,const char*,const char*);
    3939  void recordServiceStatus(maps*);
    40   void recordResponse(maps*,char*,bool);
     40  void recordResponse(maps*,char*);
    4141#endif
    4242
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