// Disable stops a failpoint from firing.
174727
func Disable(failpath string) error {
	failpointsMu.RLock()
	fp := failpoints[failpath]
	failpointsMu.RUnlock()
	if fp == nil {
		return ErrNoExist
	}
	fp.mu.Lock()
	defer fp.mu.Unlock()
	if fp.t == nil {
		return ErrDisabled
	}
	fp.t = nil
	return nil
}
297397
func (p *PWMPin) Enable(enable bool) (err error) {
	if p.enabled != enable {
		p.enabled = enable
		enableVal := 0
		if enable {
			enableVal = 1
		}
		_, err = p.write(p.pwmEnablePath(), []byte(fmt.Sprintf("%v", enableVal)))
	}
	return
}
966136
func (s *User) SetEnabled(v bool) *User {
	s.Enabled = &v
	return s
}
262739
func Disable() error {
	log.Print("Disabling gvisor...")
	if err := os.Remove(filepath.Join(nodeDir, constants.ContainerdConfigTomlPath)); err != nil {
		return errors.Wrapf(err, "removing %s", constants.ContainerdConfigTomlPath)
	}
	log.Printf("Restoring default config.toml at %s", constants.ContainerdConfigTomlPath)
	if err := mcnutils.CopyFile(filepath.Join(nodeDir, constants.StoredContainerdConfigTomlPath), filepath.Join(nodeDir, constants.ContainerdConfigTomlPath)); err != nil {
		return errors.Wrap(err, "reverting back to default config.toml")
	}
	// restart containerd
	if err := restartContainerd(); err != nil {
		return errors.Wrap(err, "restarting containerd")
	}
	log.Print("Successfully disabled gvisor")
	return nil
}
1156304
func (s *LoggingConfig) SetEnabled(v bool) *LoggingConfig {
	s.Enabled = &v
	return s
}
1293217
func (m *BaseMechanism) Disable() {
	atomic.StoreInt64(&m.activated, 0)
	atomic.StoreInt64(&m.enabled, 0)
}
856577
func (comments *Comments) Disable() error {
	switch comments.item.media.(type) {
	case *StoryMedia:
		return fmt.Errorf("Incompatible type. Cannot use Disable() with StoryMedia type")
	default:
	}

	insta := comments.item.media.instagram()
	data, err := insta.prepareData(
		map[string]interface{}{
			"media_id": comments.item.ID,
		},
	)
	if err != nil {
		return err
	}

	_, err = insta.sendRequest(
		&reqOptions{
			Endpoint: fmt.Sprintf(urlCommentDisable, comments.item.ID),
			Query:    generateSignature(data),
			IsPost:   true,
		},
	)
	return err
}
937402
func (s *LogSetup) SetEnabled(v bool) *LogSetup {
	s.Enabled = &v
	return s
}
233799
func Disable() p.Plugin {
	return p.NewRequestPlugin(func(ctx *c.Context, h c.Handler) {
		// Assert http.Transport to work with the instance
		transport, ok := ctx.Client.Transport.(*http.Transport)
		if !ok {
			h.Next(ctx)
			return
		}

		// Override the http.Client transport
		transport.DisableCompression = true
		ctx.Client.Transport = transport

		h.Next(ctx)
	})
}
1060441
func (s *RequestProgress) SetEnabled(v bool) *RequestProgress {
	s.Enabled = &v
	return s
}
1026612
func (q *PlanQueue) SetEnabled(enabled bool) {
	q.l.Lock()
	q.enabled = enabled
	q.l.Unlock()
	if !enabled {
		q.Flush()
	}
}
220659
func (m *BaseMechanismManager) Disable() {
	atomic.StoreInt64(&m.activated, 0)
	atomic.StoreInt64(&m.enabled, 0)

	m.Mechanisms.Iter(func(_ string, mechanism Mechanism) bool {
		mechanism.Disable()
		return true
	})
}
1031157
func (ep *endpoint) disableService() {
	ep.Lock()
	defer ep.Unlock()
	ep.serviceEnabled = false
}
423680
func (m *VHostManager) Disable(name string) {
	m.mu.RLock()
	defer m.mu.RUnlock()

	h, ok := m.vhosts[name]
	if ok {
		h.Disable()
	}
}
345723
func (s *Configuration) SetEnabled(v bool) *Configuration {
	s.Enabled = &v
	return s
}
238326
func (remoteAccessVpnApi *RemoteAccessVpnApi) Disable(id string) (bool, error) {
	_, err := remoteAccessVpnApi.entityService.Execute(id, REMOTE_ACCESS_VPN_DISABLE_OPERATION, []byte{}, map[string]string{})
	return err == nil, err
}
280372
func (p *PeriodicDispatch) SetEnabled(enabled bool) {
	p.l.Lock()
	defer p.l.Unlock()
	wasRunning := p.enabled
	p.enabled = enabled

	// If we are transitioning from enabled to disabled, stop the daemon and
	// flush.
	if !enabled && wasRunning {
		p.stopFn()
		p.flush()
	} else if enabled && !wasRunning {
		// If we are transitioning from disabled to enabled, run the daemon.
		ctx, cancel := context.WithCancel(context.Background())
		p.stopFn = cancel
		go p.run(ctx, p.updateCh)
	}
}