- Timestamp:
- Nov 16, 2018, 3:09:05 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/prototype-v0/zoo-project/zoo-kernel/service_internal_hpc.c
r887 r888 320 320 321 321 map* targetPathMap=getMapFromMaps(*main_conf,configurationId,"remote_data_path"); 322 map* targetPersistentPathMap=getMapFromMaps(*main_conf,configurationId,"remote_persistent_data_path"); 322 323 323 324 pthread_t threads_pool[50]; … … 362 363 for(i=0;i<len;i++){ 363 364 map* tmp=getMapArray(input->content,"cache_file",i); 365 map* origin=getMapArray(input->content,"origin",i); 364 366 char* targetName=strrchr(tmp->value,'/'); 365 char *targetPath=(char*)malloc((strlen(targetPathMap->value)+strlen(targetName)+2)*sizeof(char)); 366 sprintf(targetPath,"%s/%s",targetPathMap->value,targetName); 367 char *targetPath; 368 if(origin!=NULL && strcasecmp(origin->value,"SHARED")==0 && targetPersistentPathMap!=NULL){ 369 targetPath=(char*)malloc((strlen(targetPersistentPathMap->value)+strlen(targetName)+2)*sizeof(char)); 370 sprintf(targetPath,"%s/%s",targetPersistentPathMap->value,targetName); 371 } 372 else{ 373 targetPath=(char*)malloc((strlen(targetPathMap->value)+strlen(targetName)+2)*sizeof(char)); 374 sprintf(targetPath,"%s/%s",targetPathMap->value,targetName); 375 } 367 376 setMapArray(input->content,"targetPath",i,targetPath); 368 377 setMapArray(input->content,"localPath",i,tmp->value);
Note: See TracChangeset
for help on using the changeset viewer.