- Timestamp:
- May 4, 2019, 4:56:11 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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)
Note: See TracChangeset
for help on using the changeset viewer.