Changeset 908 for branches/prototype-v0/zoo-project/zoo-kernel
- Timestamp:
- May 4, 2019, 4:56:11 PM (6 years ago)
- Location:
- branches/prototype-v0/zoo-project/zoo-kernel
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/prototype-v0/zoo-project/zoo-kernel/Makefile.in
r902 r908 123 123 g++ -shared ${GDAL_CFLAGS} ${DEFAULT_OPTS} -fpic -o libzoo_service.${EXT} ${CFLAGS} service_internal.o service.o sqlapi.o ${FCGI_LDFLAGS} ${GDAL_LIBS} ${ZOO_LDFLAGS} ${MACOS_LD_FLAGS} 124 124 125 zoo_loader.cgi: version.h libzoo_service.${EXT} zoo_loader.c zoo_service_loader.o ulinet.o service.h lex.sr.o service_conf.tab.o service_conf.y ulinet.o main_conf_read.tab.o lex.cr.o request_parser.o response_print.o server_internal.o caching.o ${MS_FILE} ${PYTHON_FILE} ${PHP_FILE} ${JAVA_FILE} ${JS_FILE} ${PERL_FILE} ${RUBY_FILE} ${YAML_FILE} ${OTB_FILE} ${R_FILE} ${SAGA_FILE} ${HPC_FILES} ${METADB_FILE} ${JSON_FILE} service_callback.o125 zoo_loader.cgi: version.h libzoo_service.${EXT} zoo_loader.c zoo_service_loader.o ulinet.o service.h lex.sr.o service_conf.tab.o service_conf.y ulinet.o main_conf_read.tab.o lex.cr.o request_parser.o response_print.o server_internal.o caching.o ${MS_FILE} ${PYTHON_FILE} ${PHP_FILE} ${JAVA_FILE} ${JS_FILE} ${PERL_FILE} ${RUBY_FILE} ${YAML_FILE} ${OTB_FILE} ${R_FILE} ${SAGA_FILE} ${HPC_FILES} ${METADB_FILE} ${JSON_FILE} ${CALLBACK_FILE} 126 126 g++ -g -O2 ${JSON_CFLAGS} ${JSCFLAGS} ${PHPCFLAGS} ${PERLCFLAGS} ${RUBYCFLAGS} ${JAVACFLAGS} ${XML2CFLAGS} ${PYTHONCFLAGS} ${CFLAGS} -c zoo_loader.c -fno-common -DPIC -o zoo_loader.o 127 g++ ${JSON_CFLAGS} ${JSCFLAGS} ${SAGA_CFLAGS} ${OTBCFLAGS} ${GDAL_CFLAGS} ${XML2CFLAGS} ${PHPCFLAGS} ${PERLCFLAGS} ${JAVACFLAGS} ${PYTHONCFLAGS} ${CFLAGS} zoo_loader.o zoo_service_loader.o ${MS_FILE} ${PYTHON_FILE} ${PERL_FILE} ${PHP_FILE} ${JS_FILE} ${JAVA_FILE} ${YAML_FILE} ${OTB_FILE} ${SAGA_FILE} ${MONO_FILE} ${HPC_FILES} ${METADB_FILE} ${JSON_FILE} ${R_FILE} service_callback.oresponse_print.o server_internal.o caching.o request_parser.o ulinet.o lex.cr.o lex.sr.o service_conf.tab.o main_conf_read.tab.o -o zoo_loader.cgi -L. ${LDFLAGS}127 g++ ${JSON_CFLAGS} ${JSCFLAGS} ${SAGA_CFLAGS} ${OTBCFLAGS} ${GDAL_CFLAGS} ${XML2CFLAGS} ${PHPCFLAGS} ${PERLCFLAGS} ${JAVACFLAGS} ${PYTHONCFLAGS} ${CFLAGS} zoo_loader.o zoo_service_loader.o ${MS_FILE} ${PYTHON_FILE} ${PERL_FILE} ${PHP_FILE} ${JS_FILE} ${JAVA_FILE} ${YAML_FILE} ${OTB_FILE} ${SAGA_FILE} ${MONO_FILE} ${HPC_FILES} ${METADB_FILE} ${JSON_FILE} ${R_FILE} ${CALLBACK_FILE} response_print.o server_internal.o caching.o request_parser.o ulinet.o lex.cr.o lex.sr.o service_conf.tab.o main_conf_read.tab.o -o zoo_loader.cgi -L. ${LDFLAGS} 128 128 129 zcfg2yaml: zcfg2yaml.c service.h lex.sr.o service_conf.tab.o service_conf.y main_conf_read.tab.o lex.cr.o response_print.o server_internal.o service_internal.o ${MS_FILE} ${YAML_FILE} 129 zcfg2yaml: zcfg2yaml.c service.h lex.sr.o service_conf.tab.o service_conf.y main_conf_read.tab.o lex.cr.o response_print.o server_internal.o service_internal.o ${MS_FILE} ${YAML_FILE} ${CALLBACK_FILE} 130 130 g++ -g -O2 ${JSCFLAGS} ${RUBYCFLAGS} ${XML2CFLAGS} ${CFLAGS} -c zcfg2yaml.c -fno-common -DPIC -o zcfg2yaml.o 131 g++ ${XML2CFLAGS} ${CFLAGS} zcfg2yaml.o caching.o ulinet.o service_callback.oserver_internal.o service_internal.o ${MS_FILE} response_print.o lex.cr.o lex.sr.o service_conf.tab.o main_conf_read.tab.o ${YAML_FILE} -o zcfg2yaml -L. ${LDFLAGS}131 g++ ${XML2CFLAGS} ${CFLAGS} zcfg2yaml.o caching.o ulinet.o ${CALLBACK_FILE} server_internal.o service_internal.o ${MS_FILE} response_print.o lex.cr.o lex.sr.o service_conf.tab.o main_conf_read.tab.o ${YAML_FILE} -o zcfg2yaml -L. ${LDFLAGS} 132 132 133 133 install: zoo_loader.cgi -
branches/prototype-v0/zoo-project/zoo-kernel/caching.c
r899 r908 29 29 #include "service_internal.h" 30 30 #include "response_print.h" 31 31 #ifdef MS_FORCE_LOCAL_FILE_USE 32 #include "ogr_api.h" 33 #include "mapserver.h" 34 #endif 32 35 /** 33 36 * Compute md5 … … 677 680 char *mimeType=NULL; 678 681 char *origin=NULL; 679 intfsize=0;682 long long fsize=0; 680 683 map* memUse=getMapFromMaps(*m,"main","memory"); 681 684 … … 756 759 757 760 char ltmp1[256]; 758 sprintf(ltmp1,"% d",fsize);761 sprintf(ltmp1,"%ld",fsize); 759 762 addToMap(*content,"size",ltmp1); 760 763 if(cached==NULL){ … … 782 785 } 783 786 } 784 free(fcontent); 785 free(mimeType); 786 free(cached); 787 if(fcontent!=NULL) 788 free(fcontent); 789 if(mimeType!=NULL) 790 free(mimeType); 791 if(cahced!:NULL) 792 free(cached); 787 793 return 0; 788 794 } -
branches/prototype-v0/zoo-project/zoo-kernel/request_parser.c
r890 r908 28 28 #include "response_print.h" 29 29 #include "caching.h" 30 #include "cgic.h" 30 31 31 32 /** -
branches/prototype-v0/zoo-project/zoo-kernel/response_print.c
r902 r908 672 672 } 673 673 nc3=NULL; 674 map* sType=getMap(serv->content,"serviceType"); 674 675 for(;i<limit;i+=2){ 675 676 if(capabilities[vid][i]==NULL) … … 687 688 xmlNewNsProp(nc1,ns,BAD_CAST capabilities[vid][i],BAD_CAST tmp1->value); 688 689 } 689 else 690 xmlNewNsProp(nc1,ns,BAD_CAST capabilities[vid][i],BAD_CAST capabilities[vid][i+1]); 690 else{ 691 if(i==3 && vid==1 && sType!=NULL && strstr(sType->value,"HPC")!=NULL) 692 xmlNewNsProp(nc1,ns,BAD_CAST capabilities[vid][i],BAD_CAST "async-execute dismiss"); 693 else 694 xmlNewNsProp(nc1,ns,BAD_CAST capabilities[vid][i],BAD_CAST capabilities[vid][i+1]); 695 } 691 696 } 692 697 } … … 718 723 * @param content the servive main content created from the zcfg file 719 724 * @param vid the version identifier (0 for 1.0.0 and 1 for 2.0.0) 720 */ 721 void attachAttributes(xmlNodePtr n,xmlNsPtr ns,map* content,int vid){ 725 * @param serviceType string containing the current service type 726 */ 727 void attachAttributes(xmlNodePtr n,xmlNsPtr ns,map* content,int vid,map* serviceType){ 722 728 int limit=7; 723 729 for(int i=1;i<limit;i+=2){ … … 738 744 } 739 745 else{ 740 if( vid==0 && i>=2)741 xmlNew Prop(n,BAD_CAST capabilities[vid][i],BAD_CAST capabilities[vid][i+1]);746 if(i==3 && vid==1 && serviceType!=NULL && strstr(serviceType->value,"HPC")!=NULL) 747 xmlNewNsProp(n,ns,BAD_CAST capabilities[vid][i],BAD_CAST "async-execute dismiss"); 742 748 else 743 xmlNewNsProp(n,ns,BAD_CAST capabilities[vid][i],BAD_CAST capabilities[vid][i+1]); 749 if(vid==0 && i>=2) 750 xmlNewProp(n,BAD_CAST capabilities[vid][i],BAD_CAST capabilities[vid][i+1]); 751 else 752 xmlNewNsProp(n,ns,BAD_CAST capabilities[vid][i],BAD_CAST capabilities[vid][i+1]); 744 753 } 745 754 } … … 1024 1033 if(vid==0){ 1025 1034 nc = xmlNewNode(NULL, BAD_CAST "ProcessDescription"); 1026 attachAttributes(nc,ns,serv->content,vid );1035 attachAttributes(nc,ns,serv->content,vid,NULL); 1027 1036 } 1028 1037 else{ … … 1041 1050 } 1042 1051 } 1043 attachAttributes(nc2,NULL,serv->content,vid );1052 attachAttributes(nc2,NULL,serv->content,vid,serviceType); 1044 1053 map* level=getMap(serv->content,"level"); 1045 1054 if(level!=NULL && strcasecmp(level->value,"generic")==0) -
branches/prototype-v0/zoo-project/zoo-kernel/server_internal.c
r902 r908 374 374 } 375 375 fseek(file, 0, SEEK_END); 376 long count = ftell(file); 377 sprintf(rsize,"%lld",ftell(file)); 376 zStatStruct f_status; 377 int s=zStat(filename, &f_status); 378 sprintf(rsize,"%lld",file_status.st_size); 378 379 rewind(file); 379 380 if(getMap(content,"storage")==NULL){ -
branches/prototype-v0/zoo-project/zoo-kernel/service_internal_hpc.c
r902 r908 34 34 #include "mimetypes.h" 35 35 #include <sys/un.h> 36 #include "cgic.h"37 36 38 37 typedef struct { -
branches/prototype-v0/zoo-project/zoo-kernel/service_internal_python.h
r899 r908 28 28 #pragma once 29 29 30 #include <Python.h> 30 31 #include "service_internal.h" 31 32 #include "response_print.h" 32 #include <Python.h>33 33 #ifdef WIN32 34 34 #include <windows.h> 35 35 #include <direct.h> 36 36 #endif 37 #include "cgic.h"38 37 39 38 PyDictObject* PyDict_FromMaps(maps* t);
Note: See TracChangeset
for help on using the changeset viewer.