mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-11-04 13:22:36 +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