Changeset 360 for trunk/zoo-project/zoo-kernel
- Timestamp:
- Jun 7, 2012, 10:54:31 PM (13 years ago)
- Location:
- trunk/zoo-project/zoo-kernel
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-project/zoo-kernel/service.h
r348 r360 2 2 * Author : Gérald FENOY 3 3 * 4 * Copyright (c) 2009-201 0GeoLabs SARL4 * Copyright (c) 2009-2012 GeoLabs SARL 5 5 * 6 6 * Permission is hereby granted, free of charge, to any person obtaining a copy … … 596 596 } 597 597 598 static map* getMapArray(map* m,char* key,int index){ 599 char tmp[1024]; 600 if(index>0) 601 sprintf(tmp,"%s_%d",key,index); 602 else 603 sprintf(tmp,key); 604 #ifdef DEBUG 605 fprintf(stderr,"** KEY %s\n",tmp); 606 #endif 607 map* tmpMap=getMap(m,tmp); 608 #ifdef DEBUG 609 if(tmpMap!=NULL) 610 dumpMap(tmpMap); 611 #endif 612 return tmpMap; 613 } 614 615 616 static void setMapArray(map* m,char* key,int index,char* value){ 617 char tmp[1024]; 618 if(index>0) 619 sprintf(tmp,"%s_%d",key,index); 620 else 621 sprintf(tmp,key); 622 map* tmpSize=getMapArray(m,"size",index); 623 if(tmpSize!=NULL && strncasecmp(key,"value",5)==0){ 624 fprintf(stderr,"%s\n",tmpSize->value); 625 map* ptr=getMapOrFill(m,tmp,""); 626 free(ptr->value); 627 ptr->value=(char*)malloc((atoi(tmpSize->value)+1)*sizeof(char)); 628 memcpy(ptr->value,value,atoi(tmpSize->value)); 629 } 630 else 631 addToMap(m,tmp,value); 632 } 633 634 static map* getMapType(map* mt){ 635 map* tmap=getMap(mt,"mimeType"); 636 if(tmap==NULL){ 637 tmap=getMap(mt,"dataType"); 638 if(tmap==NULL){ 639 tmap=getMap(mt,"CRS"); 640 } 641 } 642 dumpMap(tmap); 643 return tmap; 644 } 645 646 static int addMapsArrayToMaps(maps** mo,maps* mi,char* typ){ 647 maps* tmp=mi; 648 maps* _cursor=*mo; 649 maps* tmpMaps=getMaps(_cursor,tmp->name); 650 651 if(tmpMaps==NULL) 652 return -1; 653 654 map* tmpLength=getMap(tmpMaps->content,"length"); 655 char tmpLen[10]; 656 int len=1; 657 if(tmpLength!=NULL){ 658 len=atoi(tmpLength->value); 659 } 660 661 map* tmpValI=getMap(tmp->content,"value"); 662 char *tmpV[8]={ 663 "size", 664 "value", 665 "uom", 666 "Reference", 667 "xlink:href", 668 typ, 669 "schema", 670 "encoding" 671 }; 672 sprintf(tmpLen,"%d",len+1); 673 addToMap(_cursor->content,"length",tmpLen); 674 int i=0; 675 map* tmpSizeI=getMap(tmp->content,tmpV[i]); 676 for(0;i<8;i++){ 677 map* tmpVI=getMap(tmp->content,tmpV[i]); 678 if(tmpVI!=NULL){ 679 fprintf(stderr,"%s = %s\n",tmpV[i],tmpVI->value); 680 if(i<5) 681 setMapArray(_cursor->content,tmpV[i],len,tmpVI->value); 682 else 683 if(strncasecmp(tmpV[5],"mimeType",8)==0) 684 setMapArray(_cursor->content,tmpV[i],len,tmpVI->value); 685 } 686 } 687 688 addToMap(_cursor->content,"isArray","true"); 689 return 0; 690 } 598 691 599 692 static void setMapInMaps(maps* m,const char* key,const char* subkey,const char *value){ -
trunk/zoo-project/zoo-kernel/service_internal.c
r351 r360 2 2 * Author : Gérald FENOY 3 3 * 4 * Copyright (c) 2009-201 1GeoLabs SARL4 * Copyright (c) 2009-2012 GeoLabs SARL 5 5 * 6 6 * Permission is hereby granted, free of charge, to any person obtaining a copy … … 2188 2188 map* tmpContent=tmpIoType->content; 2189 2189 map* cval=NULL; 2190 2190 int hasPassed=-1; 2191 2191 while(tmpContent!=NULL){ 2192 2192 if((cval=getMap(tmpMaps->content,tmpContent->name))==NULL){ … … 2198 2198 else 2199 2199 addToMap(tmpMaps->content,tmpContent->name,tmpContent->value); 2200 2201 if(hasPassed<0 && type==0 && getMap(tmpMaps->content,"isArray")!=NULL){ 2202 map* length=getMap(tmpMaps->content,"length"); 2203 int i; 2204 char *tcn=strdup(tmpContent->name); 2205 for(i=1;i<atoi(length->value);i++){ 2206 dumpMap(tmpMaps->content); 2207 fprintf(stderr,"addDefaultValues %s_%d => %s\n",tcn,i,tmpContent->value); 2208 int len=strlen(tcn); 2209 char *tmp1=malloc((len+10)*sizeof(char)); 2210 sprintf(tmp1,"%s_%d",tcn,i); 2211 fprintf(stderr,"addDefaultValues %s => %s\n",tmp1,tmpContent->value); 2212 addToMap(tmpMaps->content,tmp1,tmpContent->value); 2213 free(tmp1); 2214 hasPassed=1; 2215 } 2216 free(tcn); 2217 } 2200 2218 } 2201 2219 tmpContent=tmpContent->next; … … 2484 2502 return errorException(m, _("Unable to download the file."), "InternalError"); 2485 2503 } 2504 2486 2505 map* tmpMap=getMapOrFill(content,"value",""); 2506 2487 2507 free(tmpMap->value); 2488 2508 tmpMap->value=(char*)malloc((fsize+1)*sizeof(char)); 2489 memcpy(tmpMap->value,fcontent,(fsize)*sizeof(char)); 2509 memcpy(tmpMap->value,fcontent,(fsize)*sizeof(char)); 2510 2490 2511 char ltmp1[256]; 2491 2512 sprintf(ltmp1,"%d",fsize); -
trunk/zoo-project/zoo-kernel/service_internal_java.c
r355 r360 2 2 * Author : Gérald FENOY 3 3 * 4 * Copyright (c) 2009-201 1GeoLabs SARL4 * Copyright (c) 2009-2012 GeoLabs SARL 5 5 * 6 6 * Permission is hereby granted, free of charge, to any person obtaining a copy … … 201 201 maps* tmp=t; 202 202 while(tmp!=NULL){ 203 map* tmap=getMapType(tmp->content); 203 204 map* tmp1=tmp->content; 204 205 scObject1 = (*env)->NewObject(env, scHashMap_class, scHashMap_constructor); 205 206 map* sizeV=getMap(tmp1,"size"); 207 map* isArray=getMap(tmp1,"isArray"); 208 map* alen=getMap(tmp1,"length"); 206 209 while(tmp1!=NULL){ 207 if(sizeV!=NULL && strcmp(tmp1->name,"value")==0){ 208 jbyteArray tmpData=(*env)->NewByteArray(env,atoi(sizeV->value)); 209 (*env)->SetByteArrayRegion(env,tmpData,0,atoi(sizeV->value),tmp1->value); 210 (*env)->CallObjectMethod(env,scObject1, put_mid, (*env)->NewStringUTF(env,tmp1->name), tmpData); 211 }else 210 if(strcmp(tmp1->name,"value")==0){ 211 if(isArray==NULL){ 212 if(sizeV!=NULL && strcmp(tmp1->name,"value")==0){ 213 jbyteArray tmpData=(*env)->NewByteArray(env,atoi(sizeV->value)); 214 (*env)->SetByteArrayRegion(env,tmpData,0,atoi(sizeV->value),tmp1->value); 215 (*env)->CallObjectMethod(env,scObject1, put_mid, (*env)->NewStringUTF(env,tmp1->name), tmpData); 216 }else 217 (*env)->CallObjectMethod(env,scObject1, put_mid, (*env)->NewStringUTF(env,tmp1->name), (*env)->NewStringUTF(env,tmp1->value)); 218 } 219 else{ 220 int alen1=atoi(alen->value); 221 fprintf(stderr,"LENGTH %d \n",alen1); 222 223 jclass scArrayListClass,scArrayList_class; 224 jmethodID scArrayList_constructor; 225 jobject scObject2,scObject3,scObject4; 226 scArrayListClass = (*env)->FindClass(env, "java/util/ArrayList"); 227 scArrayList_class = (*env)->NewGlobalRef(env, scArrayListClass); 228 scArrayList_constructor = (*env)->GetMethodID(env, scArrayList_class, "<init>", "()V"); 229 jmethodID add_mid = 0; 230 scObject2 = (*env)->NewObject(env, scArrayList_class, scArrayList_constructor); 231 scObject3 = (*env)->NewObject(env, scArrayList_class, scArrayList_constructor); 232 scObject4 = (*env)->NewObject(env, scArrayList_class, scArrayList_constructor); 233 234 add_mid = (*env)->GetMethodID(env,scArrayListClass, 235 "add","(Ljava/lang/Object;)Z"); 236 237 int i; 238 239 for(i=0;i<alen1;i++){ 240 map* vMap=getMapArray(tmp->content,"value",i); 241 map* sMap=getMapArray(tmp->content,"size",i); 242 map* mMap=getMapArray(tmp->content,tmap->value,i); 243 244 if(sMap!=NULL && vMap!=NULL && strncmp(vMap->name,"value",5)==0){ 245 jbyteArray tmpData=(*env)->NewByteArray(env,atoi(sMap->value)); 246 (*env)->SetByteArrayRegion(env,tmpData,0,atoi(sMap->value),vMap->value); 247 (*env)->CallObjectMethod(env,scObject2, add_mid, tmpData); 248 }else{ 249 jobject tmpData=(*env)->NewStringUTF(env,vMap->value); 250 (*env)->CallObjectMethod(env,scObject2, add_mid, tmpData); 251 } 252 253 } 254 255 (*env)->CallObjectMethod(env,scObject1, put_mid, (*env)->NewStringUTF(env,tmp1->name), scObject2); 256 257 } 258 } 259 else 212 260 (*env)->CallObjectMethod(env,scObject1, put_mid, (*env)->NewStringUTF(env,tmp1->name), (*env)->NewStringUTF(env,tmp1->value)); 213 261 tmp1=tmp1->next; -
trunk/zoo-project/zoo-kernel/service_internal_js.c
r348 r360 2 2 * Author : Gérald FENOY 3 3 * 4 * Copyright (c) 2009-201 0GeoLabs SARL4 * Copyright (c) 2009-2012 GeoLabs SARL 5 5 * 6 6 * Permission is hereby granted, free of charge, to any person obtaining a copy … … 352 352 jsval resf = OBJECT_TO_JSVAL(res); 353 353 map* tmpm=t; 354 map* isArray=getMap(t,"isArray"); 355 map* isBinary=getMap(t,"size"); 356 map* tmap=getMapType(t); 357 if(tmap==NULL) 358 fprintf(stderr,"tmap is null !\n"); 359 else 360 fprintf(stderr,"tmap is not null ! (%s = %s)\n",tmap->name,tmap->value); 361 362 /* Avoid gesture of binary content which failed due to strlen function use */ 363 if(isBinary!=NULL){ 364 return res; 365 } 354 366 while(tmpm!=NULL){ 355 jsval jsstr = STRING_TO_JSVAL(JS_NewStringCopyN(cx,tmpm->value,strlen(tmpm->value))); 356 JS_SetProperty(cx, res, tmpm->name,&jsstr); 357 #ifdef JS_DEBUG 358 fprintf(stderr,"%s => %s\n",tmpm->name,tmpm->value); 359 #endif 367 if(isArray==NULL || strncasecmp(tmpm->name,"value",5)!=0 || 368 (tmap!=NULL && strncasecmp(tmpm->name,tmap->name,strlen(tmap->name))!=0)){ 369 jsval jsstr = STRING_TO_JSVAL(JS_NewStringCopyN(cx,tmpm->value,strlen(tmpm->value))); 370 JS_SetProperty(cx, res, tmpm->name,&jsstr); 371 #ifdef JS_DEBUG 372 fprintf(stderr,"%s => %s\n",tmpm->name,tmpm->value); 373 #endif 374 } 360 375 tmpm=tmpm->next; 376 } 377 if(isArray!=NULL){ 378 map* len=getMap(t,"length"); 379 int cnt=atoi(len->value); 380 JSObject* values=JS_NewArrayObject( cx, cnt, NULL ); 381 JSObject* mvalues=JS_NewArrayObject( cx, cnt, NULL ); 382 map *tmpm1,*tmpm2; 383 int i=0; 384 for(i=0;i<cnt;i++){ 385 tmpm1=getMapArray(t,"value",i); 386 tmpm2=getMapArray(t,tmap->name,i); 387 if(tmpm1!=NULL){ 388 jsval jsstr = STRING_TO_JSVAL(JS_NewStringCopyN(cx,tmpm1->value,strlen(tmpm1->value))); 389 JS_SetElement( cx, values, i, &jsstr ); 390 } 391 if(tmpm2!=NULL){ 392 jsval jsstr = STRING_TO_JSVAL(JS_NewStringCopyN(cx,tmpm2->value,strlen(tmpm2->value))); 393 JS_SetElement( cx, mvalues, i, &jsstr ); 394 } 395 } 396 jsval jvalues=OBJECT_TO_JSVAL(values); 397 jsval jmvalues=OBJECT_TO_JSVAL(mvalues); 398 JS_SetProperty(cx, res,"value",&jvalues); 399 JS_SetProperty(cx, res,tmap->name,&jmvalues); 361 400 } 362 401 return res; -
trunk/zoo-project/zoo-kernel/service_internal_ms.c
r357 r360 126 126 127 127 if(proto>0){ 128 map* test=getMap(tmpI->content,"real_extent");129 if(test!=NULL)130 extent=test;131 128 sprintf(webService_url, 132 129 "%s?map=%s/%s_%s.map&request=%s&service=%s&version=%s&%s&format=%s&bbox=%s&crs=%s", … … 145 142 } 146 143 else{ 147 map* test=getMap(tmpI->content,"real_extent_reverse");148 if(test!=NULL)149 extent=test;150 144 sprintf(webService_url, 151 145 "%s?map=%s/%s_%s.map&request=%s&service=%s&version=%s&%s&width=%s&height=%s&format=%s&bbox=%s&crs=%s", … … 281 275 282 276 if(output!=NULL){ 277 283 278 map* test=getMap(output->content,"real_extent"); 284 279 if(test!=NULL){ 285 280 pointObj min, max; 286 281 projectionObj tempSrs; 287 282 288 283 min.x = m->extent.minx; 289 284 min.y = m->extent.miny; … … 291 286 max.y = m->extent.maxy; 292 287 char tmpSrsStr[1024]; 293 288 289 294 290 msInitProjection(&tempSrs); 295 291 msLoadProjectionStringEPSG(&tempSrs,"EPSG:4326"); 296 292 297 293 msProjectPoint(&(m->projection),&tempSrs,&min); 298 294 msProjectPoint(&m->projection,&tempSrs,&max); 299 295 300 296 sprintf(tmpExtent,"%.3f,%.3f,%.3f,%.3f",min.y,min.x,max.y,max.x); 297 map* isGeo=getMap(output->content,"crs_isGeographic"); 298 fprintf(stderr,"isGeo = %s\n",isGeo->value); 299 if(isGeo!=NULL && strcasecmp("true",isGeo->value)==0) 300 sprintf(tmpExtent,"%f,%f,%f,%f", minY,minX, maxY, maxX); 301 301 addToMap(output->content,"wms_extent",tmpExtent); 302 sprintf(tmp Extent,"%.3f,%.3f,%.3f,%.3f",min.x,min.y,max.x,max.y);302 sprintf(tmpSrsStr,"%.3f,%.3f,%.3f,%.3f",min.x,min.y,max.x,max.y); 303 303 addToMap(output->content,"wcs_extent",tmpExtent); 304 304 dumpMap(output->content); 305 305 306 }else{ 306 307 sprintf(tmpExtent,"%f,%f,%f,%f",minX, minY, maxX, maxY); … … 308 309 fprintf(stderr,"isGeo = %s\n",isGeo->value); 309 310 if(isGeo!=NULL && strcasecmp("true",isGeo->value)==0) 310 311 sprintf(tmpExtent,"%f,%f,%f,%f", minY,minX, maxY, maxX); 311 312 addToMap(output->content,"wms_extent",tmpExtent); 312 313 sprintf(tmpExtent,"%.3f,%.3f,%.3f,%.3f",minX,minY,maxX,maxY); 313 addToMap(output->content,"wcs_extent",tmpExtent); 314 } 314 addToMap(output->content,"wcs_extent",tmpExtent); 315 316 } 317 315 318 } 316 319 … … 858 861 * Firs store the value on disk 859 862 */ 863 map* mime=getMap(outputs->content,"mimeType"); 864 char *ext="data"; 865 if(mime!=NULL) 866 if(strncasecmp(mime->value,"application/json",16)==0) 867 ext="json"; 868 860 869 map* tmpMap=getMapFromMaps(conf,"main","dataPath"); 861 870 map* sidMap=getMapFromMaps(conf,"lenv","sid"); 862 871 char *pszDataSource=(char*)malloc((strlen(tmpMap->value)+strlen(sidMap->value)+strlen(outputs->name)+17)*sizeof(char)); 863 sprintf(pszDataSource,"%s/ZOO_DATA_%s_%s. data",tmpMap->value,outputs->name,sidMap->value);872 sprintf(pszDataSource,"%s/ZOO_DATA_%s_%s.%s",tmpMap->value,outputs->name,sidMap->value,ext); 864 873 int f=open(pszDataSource,O_WRONLY|O_CREAT,S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH); 865 874 map* sizeMap=getMap(outputs->content,"size"); -
trunk/zoo-project/zoo-kernel/service_internal_python.c
r348 r360 2 2 * Author : Gérald FENOY 3 3 * 4 * Copyright (c) 2009-201 1GeoLabs SARL4 * Copyright (c) 2009-2012 GeoLabs SARL 5 5 * 6 6 * Permission is hereby granted, free of charge, to any person obtaining a copy … … 208 208 PyObject* res=PyDict_New( ); 209 209 map* tmp=t; 210 int hasSize=0; 211 map* isArray=getMap(tmp,"isArray"); 210 212 map* size=getMap(tmp,"size"); 213 map* tmap=getMapType(tmp); 211 214 while(tmp!=NULL){ 212 215 PyObject* name=PyString_FromString(tmp->name); 213 if(strcasecmp(tmp->name,"value")==0){ 214 if(size!=NULL){ 216 if(strcasecmp(tmp->name,"value")==0) { 217 if(isArray!=NULL){ 218 map* len=getMap(tmp,"length"); 219 int cnt=atoi(len->value); 220 PyObject* value=PyList_New(cnt); 221 PyObject* mvalue=PyList_New(cnt); 222 PyObject* svalue=PyList_New(cnt); 223 224 for(int i=0;i<cnt;i++){ 225 226 map* vMap=getMapArray(tmp,"value",i); 227 map* sMap=getMapArray(tmp,"size",i); 228 229 if(vMap!=NULL){ 230 231 PyObject* lvalue; 232 PyObject* lsvalue; 233 if(sMap==NULL){ 234 lvalue=PyString_FromString(vMap->value); 235 lsvalue=Py_None; 236 } 237 else{ 238 lvalue=PyString_FromStringAndSize(vMap->value,atoi(sMap->value)); 239 lsvalue=PyString_FromString(sMap->value); 240 hasSize=1; 241 } 242 243 if(PyList_SetItem(value,i,lvalue)<0){ 244 fprintf(stderr,"Unable to set key value pair..."); 245 return NULL; 246 } 247 if(PyList_SetItem(svalue,i,lsvalue)<0){ 248 fprintf(stderr,"Unable to set key value pair..."); 249 return NULL; 250 } 251 } 252 253 map* mMap=getMapArray(tmp,tmap->name,i); 254 PyObject* lmvalue; 255 if(mMap!=NULL){ 256 lmvalue=PyString_FromString(mMap->value); 257 }else 258 lmvalue=Py_None; 259 260 if(PyList_SetItem(mvalue,i,lmvalue)<0){ 261 fprintf(stderr,"Unable to set key value pair..."); 262 return NULL; 263 } 264 265 } 266 267 if(PyDict_SetItem(res,name,value)<0){ 268 fprintf(stderr,"Unable to set key value pair..."); 269 return NULL; 270 } 271 if(PyDict_SetItem(res,PyString_FromString(tmap->name),mvalue)<0){ 272 fprintf(stderr,"Unable to set key value pair..."); 273 return NULL; 274 } 275 if(hasSize>0) 276 if(PyDict_SetItem(res,PyString_FromString("size"),svalue)<0){ 277 fprintf(stderr,"Unable to set key value pair..."); 278 return NULL; 279 } 280 } 281 else if(size!=NULL){ 215 282 PyObject* value=PyString_FromStringAndSize(tmp->value,atoi(size->value)); 216 283 if(PyDict_SetItem(res,name,value)<0){ … … 228 295 } 229 296 else{ 230 PyObject* value=PyString_FromString(tmp->value); 231 if(PyDict_SetItem(res,name,value)<0){ 232 fprintf(stderr,"Unable to set key value pair..."); 233 return NULL; 297 if(PyDict_GetItem(res,name)==NULL){ 298 PyObject* value=PyString_FromString(tmp->value); 299 if(PyDict_SetItem(res,name,value)<0){ 300 fprintf(stderr,"Unable to set key value pair..."); 301 return NULL; 302 } 234 303 } 235 304 } -
trunk/zoo-project/zoo-kernel/zoo_service_loader.c
r348 r360 2 2 * Author : Gérald FENOY 3 3 * 4 * Copyright 2008-201 1GeoLabs SARL. All rights reserved.4 * Copyright 2008-2012 GeoLabs SARL. All rights reserved. 5 5 * 6 6 * Permission is hereby granted, free of charge, to any person obtaining a copy … … 92 92 str[i]=toReplaceBy; 93 93 } 94 } 95 96 /** 97 * Create (or append to) an array valued maps 98 * value = "["",""]" 99 */ 100 int appendMapsToMaps(maps* m,maps* mo,maps* mi,elements* elem){ 101 102 map* tmap=getMapType(mo->content); 103 if(tmap==NULL){ 104 tmap=getMapType(elem->defaults->content); 105 } 106 107 map* testMap=getMap(elem->content,"maxOccurs"); 108 if(testMap!=NULL){ 109 if(strncasecmp(testMap->value,"unbounded",9)!=0 && atoi(testMap->value)>1){ 110 if(addMapsArrayToMaps(&mo,mi,tmap->name)<0){ 111 char emsg[1024]; 112 sprintf(emsg,_("You set maximum occurences for <%s> as %i but you tried to use it more than the limit you set. Please correct your ZCFG file or your request."),mi->name,atoi(testMap->value)); 113 errorException(m,emsg,"InternalError"); 114 return -1; 115 } 116 }else{ 117 if(strncasecmp(testMap->value,"unbounded",9)==0){ 118 if(addMapsArrayToMaps(&mo,mi,tmap->name)<0){ 119 char emsg[1024]; 120 map* tmpMap=getMap(mi->content,"length"); 121 sprintf(emsg,_("ZOO-Kernel was unable to load your data for %s position %s."),mi->name,tmpMap->value); 122 errorException(m,emsg,"InternalError"); 123 return -1; 124 } 125 } 126 else{ 127 char emsg[1024]; 128 sprintf(emsg,_("You set maximum occurences for <%s> to one but you tried to use it more than once. Please correct your ZCFG file or your request."),mi->name); 129 errorException(m,emsg,"InternalError"); 130 return -1; 131 } 132 } 133 } 134 return 0; 94 135 } 95 136 … … 1068 1109 if(request_input_real_format==NULL) 1069 1110 request_input_real_format=dupMaps(&tmpmaps); 1070 else 1071 addMapsToMaps(&request_input_real_format,tmpmaps); 1111 else{ 1112 maps* testPresence=getMaps(request_input_real_format,tmpmaps->name); 1113 if(testPresence!=NULL){ 1114 elements* elem=getElements(s1->inputs,tmpmaps->name); 1115 if(elem!=NULL){ 1116 if(appendMapsToMaps(m,request_input_real_format,tmpmaps,elem)<0){ 1117 freeMaps(&m); 1118 free(m); 1119 free(REQUEST); 1120 free(SERVICE_URL); 1121 InternetCloseHandle(hInternet); 1122 freeService(&s1); 1123 free(s1); 1124 return 0; 1125 } 1126 } 1127 } 1128 else 1129 addMapsToMaps(&request_input_real_format,tmpmaps); 1130 } 1072 1131 freeMaps(&tmpmaps); 1073 1132 free(tmpmaps); … … 1479 1538 fflush(stderr); 1480 1539 #endif 1481 addMapsToMaps(&request_input_real_format,tmpmaps); 1540 1541 { 1542 maps* testPresence=getMaps(request_input_real_format,tmpmaps->name); 1543 if(testPresence!=NULL){ 1544 elements* elem=getElements(s1->inputs,tmpmaps->name); 1545 if(elem!=NULL){ 1546 if(appendMapsToMaps(m,request_input_real_format,tmpmaps,elem)<0){ 1547 freeMaps(&m); 1548 free(m); 1549 free(REQUEST); 1550 free(SERVICE_URL); 1551 InternetCloseHandle(hInternet); 1552 freeService(&s1); 1553 free(s1); 1554 return 0; 1555 } 1556 } 1557 } 1558 else 1559 addMapsToMaps(&request_input_real_format,tmpmaps); 1560 } 1482 1561 1483 1562 #ifdef DEBUG
Note: See TracChangeset
for help on using the changeset viewer.