// This call executes the protection policy immediately
176520
func (_class VMPPClass) ProtectNow(sessionID SessionRef, vmpp VMPPRef) (_retval string, _err error) {
	_method := "VMPP.protect_now"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_vmppArg, _err := convertVMPPRefToXen(fmt.Sprintf("%s(%s)", _method, "vmpp"), vmpp)
	if _err != nil {
		return
	}
	_result, _err := _class.client.APICall(_method, _sessionIDArg, _vmppArg)
	if _err != nil {
		return
	}
	_retval, _err = convertStringToGo(_method + " -> ", _result.Value)
	return
}
972511
func (s *Server) safelyCall(function reflect.Value, args []reflect.Value) (resp []reflect.Value, e interface{}) {
	defer func() {
		if err := recover(); err != nil {
			if !s.Config.RecoverPanic {
				// go back to panic
				panic(err)
			} else {
				e = err
				resp = nil
				s.Logger.Println("Handler crashed with error", err)
				for i := 1; ; i += 1 {
					_, file, line, ok := runtime.Caller(i)
					if !ok {
						break
					}
					s.Logger.Println(file, line)
				}
			}
		}
	}()
	return function.Call(args), nil
}
346032
func (r *Relay) Call(fn string, args ...interface{}) {
	r.exchange.callRelayMethod(r, fn, args...)
}
288963
func (snapshot *Snapshot) IsProtected() (bool, error) {
	var c_is_protected C.int
	var c_snapname *C.char = C.CString(snapshot.name)
	defer C.free(unsafe.Pointer(c_snapname))

	ret := C.rbd_snap_is_protected(snapshot.image.image, c_snapname,
		&c_is_protected)
	if ret < 0 {
		return false, RBDError(int(ret))
	}

	return c_is_protected != 0, nil
}
530952
func (smb SMBus) Block_process_call(cmd byte, buf []byte) ([]byte, error) {
	smb.Set_addr(smb.addr)
	ret, err := C.i2c_smbus_block_process_call(C.int(smb.bus.Fd()), C.__u8(cmd), C.__u8(len(buf)), ((*C.__u8)(&buf[0])))
	if err != nil {
		return nil, err
	} else {
		return buf[:ret], nil
	}
}
921925
func (a *Module) SafelyCall(fn reflect.Value, args []reflect.Value) (resp []reflect.Value, err error) {
	defer func() {
		if e := recover(); e != nil {
			resp = nil
			panicErr := echo.NewPanicError(e, nil)
			panicErr.SetDebug(a.Application.Core.Debug())
			content := fmt.Sprintf(`Handler crashed with error: %v`, e)
			for i := 1; ; i++ {
				pc, file, line, ok := runtime.Caller(i)
				if !ok {
					break
				}
				t := &echo.Trace{
					File: file,
					Line: line,
					Func: runtime.FuncForPC(pc).Name(),
				}
				panicErr.AddTrace(t)
				content += "\n" + fmt.Sprintf(`%v:%v`, file, line)
			}
			panicErr.SetErrorString(content)
			a.Application.Core.Logger().Error(panicErr)
			err = panicErr
		}
	}()
	if fn.Type().NumIn() > 0 {
		return fn.Call(args), err
	}
	return fn.Call(nil), err
}
163734
func (s *UpdateGameSessionInput) SetProtectionPolicy(v string) *UpdateGameSessionInput {
	s.ProtectionPolicy = &v
	return s
}
619495
func (f PolicyFunc) Do(ctx context.Context, request Request) (Response, error) {
	return f(ctx, request)
}
358580
func (sys *IAMSys) GetUserPolicy(accessKey string) (policyName string, err error) {
	objectAPI := newObjectLayerFn()
	if objectAPI == nil {
		return "", errServerNotInitialized
	}

	sys.RLock()
	defer sys.RUnlock()

	if _, ok := sys.iamUsersMap[accessKey]; !ok {
		return "", errNoSuchUser
	}

	if _, ok := sys.iamPolicyMap[accessKey]; !ok {
		return "", errNoSuchUser
	}

	return sys.iamPolicyMap[accessKey], nil
}
249114
func (cb *Breaker) Call(circuit func() error, timeout time.Duration) error {
	return cb.CallContext(context.Background(), circuit, timeout)
}
436494
func (cli *OpsGenieClient) Policy() (*OpsGeniePolicyClient, error) {
	cli.makeHTTPTransportSettings()

	policyClient := new(OpsGeniePolicyClient)
	policyClient.SetOpsGenieClient(*cli)

	if cli.opsGenieAPIURL == "" {
		policyClient.SetOpsGenieAPIUrl(endpointURL)
	}

	return policyClient, nil
}
1122984
func (this *SafeRpcConnPools) Call(addr, method string, args interface{}, resp interface{}) error {
	connPool, exists := this.Get(addr)
	if !exists {
		return fmt.Errorf("%s has no connection pool", addr)
	}

	conn, err := connPool.Get()
	if err != nil || conn == nil { //conn可能为空,这也属于异常情况 add by niean
		return fmt.Errorf("%s get connection fail: conn %v, err %v", addr, conn, err)
	}

	rpcClient := conn.(RpcClient)
	callTimeout := time.Duration(this.CallTimeout) * time.Millisecond

	done := make(chan error, 1)
	go func() {
		done <- rpcClient.Call(method, args, resp)
	}()

	select {
	case <-time.After(callTimeout):
		connPool.ForceClose(conn)
		return fmt.Errorf("CallTimeout: %s", addr)
	case err = <-done:
		if err != nil {
			connPool.ForceClose(conn)
		} else {
			connPool.Release(conn)
		}
		return err
	}
}
997211
func httpCreatePolicy(w http.ResponseWriter, r *http.Request, vars map[string]string) (interface{}, error) {
	log.Debugf("Received httpGetPolicy: %+v", vars)

	var obj Policy
	key := vars["key"]

	// Get object from the request
	err := json.NewDecoder(r.Body).Decode(&obj)
	if err != nil {
		log.Errorf("Error decoding policy create request. Err %v", err)
		return nil, err
	}

	// set the key
	obj.Key = key

	// Create the object
	err = CreatePolicy(&obj)
	if err != nil {
		log.Errorf("CreatePolicy error for: %+v. Err: %v", obj, err)
		return nil, err
	}

	// Return the obj
	return obj, nil
}
968725
func (a actions) call(r, c interface{}) (interface{}, error) {
	return a[0](r, c, a)
}
953141
func (mr *MockRemoteIntfMockRecorder) InitEnforcer(req, resp interface{}) *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitEnforcer", reflect.TypeOf((*MockRemoteIntf)(nil).InitEnforcer), req, resp)
}
673206
func (s *PublicBlockChainAPI) Call(ctx context.Context, args CallArgs, blockNr rpc.BlockNumber) (hexutil.Bytes, error) {
	result, _, _, err := DoCall(ctx, s.b, args, blockNr, vm.Config{}, 5*time.Second, s.b.RPCGasCap())
	return (hexutil.Bytes)(result), err
}
1268227
func (p *PolicyAuthorizer) executeCodePolicy(policy *Sentinel, scope sentinel.ScopeFn) bool {
	if p.sentinel == nil {
		return true
	}

	if policy.Code == "" || scope == nil {
		return true
	}

	enforcement := policy.EnforcementLevel
	if enforcement == "" {
		enforcement = DefaultPolicyEnforcementLevel
	}

	return p.sentinel.Execute(policy.Code, enforcement, scope())
}