mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-30 19:02:27 +00:00 
			
		
		
		
	Fix issue 3327, check environment of request type in openbmc and bmcdiscover
This commit is contained in:
		| @@ -85,6 +85,8 @@ sub process_request | ||||
|     #$::args     = $request->{arg}; | ||||
|     if (ref($request->{environment}) eq 'ARRAY' and ref($request->{environment}->[0]->{XCAT_DEV_WITHERSPOON}) eq 'ARRAY') { | ||||
|         $::XCAT_DEV_WITHERSPOON = $request->{environment}->[0]->{XCAT_DEV_WITHERSPOON}->[0]; | ||||
|     } elsif (ref($request->{environment}) eq 'ARRAY') { | ||||
|         $::XCAT_DEV_WITHERSPOON = $request->{environment}->[0]->{XCAT_DEV_WITHERSPOON}; | ||||
|     } else { | ||||
|         $::XCAT_DEV_WITHERSPOON = $request->{environment}->{XCAT_DEV_WITHERSPOON}; | ||||
|     } | ||||
|   | ||||
| @@ -283,6 +283,8 @@ sub preprocess_request { | ||||
|  | ||||
|     if (ref($request->{environment}) eq 'ARRAY' and ref($request->{environment}->[0]->{XCAT_OPENBMC_DEVEL}) eq 'ARRAY') { | ||||
|         $::OPENBMC_DEVEL = $request->{environment}->[0]->{XCAT_OPENBMC_DEVEL}->[0]; | ||||
|     } elsif (ref($request->{environment}) eq 'ARRAY') { | ||||
|         $::OPENBMC_DEVEL = $request->{environment}->[0]->{XCAT_OPENBMC_DEVEL}; | ||||
|     } else { | ||||
|         $::OPENBMC_DEVEL = $request->{environment}->{XCAT_OPENBMC_DEVEL}; | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user