// disables module and release any pins assigned.
546088
func (module *ODroidC1AnalogModule) Disable() error {
	// Unassign any pins we may have assigned
	for pin, _ := range module.definedPins {
		// attempt to assign this pin for this module.
		UnassignPin(pin)
	}

	// if there are any open analog pins, close them
	for _, openPin := range module.openPins {
		openPin.analogClose()
	}
	return nil
}
418181
func (j *JournalManager) Disable(ctx context.Context, tlfID tlf.ID) (
	wasEnabled bool, err error) {
	j.log.CDebugf(ctx, "Disabling journal for %s", tlfID)
	defer func() {
		if err != nil {
			j.deferLog.CDebugf(ctx,
				"Error when disabling journal for %s: %+v",
				tlfID, err)
		}
	}()

	j.lock.Lock()
	defer j.lock.Unlock()
	tlfJournal, ok := j.tlfJournals[tlfID]
	if !ok {
		j.log.CDebugf(ctx, "Journal doesn't exist for %s", tlfID)
		return false, nil
	}

	if j.dirtyOps[tlfID] > 0 {
		return false, errors.Errorf("Can't disable journal for %s while there "+
			"are outstanding dirty ops", tlfID)
	}
	if j.delegateDirtyBlockCache.IsAnyDirty(tlfID) {
		return false, errors.Errorf("Can't disable journal for %s while there "+
			"are any dirty blocks outstanding", tlfID)
	}

	// Disable the journal.  Note that we don't bother deleting the
	// journal from j.tlfJournals, to avoid cases where something
	// keeps it around doing background work or re-enables it, at the
	// same time JournalManager creates a new journal for the same TLF.
	wasEnabled, err = tlfJournal.disable()
	if err != nil {
		return false, err
	}

	if wasEnabled {
		j.log.CDebugf(ctx, "Disabled journal for %s", tlfID)
	}
	return wasEnabled, nil
}
470000
func (m *ARPMechanism) Disable() {
	m.BaseMechanism.Disable()

	// Remove installed handlers
	m.filter.Unhandle()

	// Match packets of ARP protocol.
	match := ofp.Match{ofp.MT_OXM, []ofp.OXM{
		ofputil.EthType(uint16(iana.ETHT_ARP), nil),
	}}

	err := of.Send(m.C.Switch.Conn(),
		// Flush installed flows
		ofputil.TableFlush(ofp.Table(m.tableNo)),
		// Flush redirect flow
		ofputil.FlowFlush(0, match),
	)

	// Release acquired table
	m.C.Switch.ReleaseTable(m.tableNo)

	if err != nil {
		log.ErrorLog("arp/DISABLE_HOOK",
			"Failed to send requests: ", err)
	}

	log.InfoLog("arp/DISABLE_HOOK", "Mechanism ARP disabled")
}
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
}
521672
func (d Driver) Disable() {
	d.mutex.Lock()
	defer d.mutex.Unlock()
	if d.enabled {
		d.stopc <- struct{}{}
	}
}
1197797
func (module *BBPWMModule) SetDuty(pin Pin, ns int64) error {
	openPin := module.openPins[pin]
	if openPin == nil {
		return fmt.Errorf("PWM pin is being written but is not enabled. Have you called EnablePin?")
	}

	return openPin.setDuty(ns)
}
115775
func (d *domainClient) Disable(ctx context.Context) (err error) {
	err = rpcc.Invoke(ctx, "HeadlessExperimental.disable", nil, nil, d.conn)
	if err != nil {
		err = &internal.OpError{Domain: "HeadlessExperimental", Op: "Disable", Err: err}
	}
	return
}
538048
func (s *stateTransitions) Disable() {
	s.Lock()

	if !s.enabled {
		s.logger.Warn("state transition controller already disabled")
		s.Unlock()
		return
	}

	s.enabled = false

	numTimers := len(s.timers)
	for address, timer := range s.timers {
		timer.Stop()
		delete(s.timers, address)
	}

	s.Unlock()
	s.logger.WithField("timersStopped", numTimers).Info("disabled state transition controller")
}
1373714
func (conn *gdbConn) disableAck() error {
	_, err := conn.exec([]byte("$QStartNoAckMode"), "init/disableAck")
	if err == nil {
		conn.ack = false
	}
	return err
}
747979
func (api *Client) RemovePin(channel string, item ItemRef) error {
	return api.RemovePinContext(context.Background(), channel, item)
}
930864
func (s *Session) unpair() error {
	if !s.verified {
		return fmt.Errorf("Unpair requires that the PIN be verified")
	}
	return s.Channel.Unpair()
}
410205
func (sc *syncClient) disable() {
	sc.lock.Lock()
	quit := sc.enabled
	sc.enabled = false
	sc.lock.Unlock()
	if quit {
		sc.quit <- true
	}
}
1056558
func (module *DTGPIOModule) makeOpenGPIOPin(pin Pin) (*DTGPIOModuleOpenPin, error) {
	p := module.definedPins[pin]
	if p == nil {
		return nil, fmt.Errorf("Pin %d is not known to GPIO module", pin)
	}

	result := &DTGPIOModuleOpenPin{pin: pin, gpioLogical: p.gpioLogical}
	module.openPins[pin] = result

	return result, nil
}
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
}
518722
func (j *tlfJournal) disable() (wasEnabled bool, err error) {
	j.journalLock.Lock()
	defer j.journalLock.Unlock()
	err = j.checkEnabledLocked()
	switch errors.Cause(err).(type) {
	case nil:
		// Continue.
		break
	case errTLFJournalDisabled:
		// Already disabled.
		return false, nil
	default:
		return false, err
	}

	blockEntryCount := j.blockJournal.length()
	mdEntryCount := j.mdJournal.length()

	// You can only disable an empty journal.
	if blockEntryCount > 0 || mdEntryCount > 0 {
		return false, errors.WithStack(errTLFJournalNotEmpty{})
	}

	j.disabled = true
	return true, nil
}
938587
func (b *URLBackoff) Disable() {
	glog.V(4).Infof("Disabling backoff strategy")
	b.Backoff = util.NewBackOff(0*time.Second, 0*time.Second)
}
1293217
func (m *BaseMechanism) Disable() {
	atomic.StoreInt64(&m.activated, 0)
	atomic.StoreInt64(&m.enabled, 0)
}