Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 24761951 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Fix ACL Manager start_round_robin logic and add log am: 648e6bb8 am: 7acff28c

Change-Id: Ic4b089d836de5bf1aef4272b8217f3892308db0b
parents fe8159d2 7acff28c
Loading
Loading
Loading
Loading
+4 −3
Original line number Original line Diff line number Diff line
@@ -21,9 +21,8 @@
#include <set>
#include <set>
#include <utility>
#include <utility>


#include "acl_fragmenter.h"
#include "acl_manager.h"
#include "common/bidi_queue.h"
#include "common/bidi_queue.h"
#include "hci/acl_fragmenter.h"
#include "hci/controller.h"
#include "hci/controller.h"
#include "hci/hci_layer.h"
#include "hci/hci_layer.h"


@@ -245,8 +244,10 @@ struct AclManager::impl {
    connection_pair->second.number_of_sent_packets_ -= credits;
    connection_pair->second.number_of_sent_packets_ -= credits;
    acl_packet_credits_ += credits;
    acl_packet_credits_ += credits;
    ASSERT(acl_packet_credits_ <= max_acl_packet_credits_);
    ASSERT(acl_packet_credits_ <= max_acl_packet_credits_);
    if (acl_packet_credits_ == credits) {
      start_round_robin();
      start_round_robin();
    }
    }
  }


  // Round-robin scheduler
  // Round-robin scheduler
  void start_round_robin() {
  void start_round_robin() {
+1 −1
Original line number Original line Diff line number Diff line
@@ -695,7 +695,7 @@ void ClassicSignallingManager::on_command_timeout() {
    LOG_ERROR("No pending command");
    LOG_ERROR("No pending command");
    return;
    return;
  }
  }

  LOG_WARN("Response time out for %s", CommandCodeText(command_just_sent_.command_code_).c_str());
  switch (command_just_sent_.command_code_) {
  switch (command_just_sent_.command_code_) {
    case CommandCode::CONNECTION_REQUEST: {
    case CommandCode::CONNECTION_REQUEST: {
      link_->OnOutgoingConnectionRequestFail(command_just_sent_.source_cid_);
      link_->OnOutgoingConnectionRequestFail(command_just_sent_.source_cid_);
+1 −0
Original line number Original line Diff line number Diff line
@@ -55,6 +55,7 @@ void Handler::Post(OnceClosure closure) {
  {
  {
    std::lock_guard<std::mutex> lock(mutex_);
    std::lock_guard<std::mutex> lock(mutex_);
    if (was_cleared()) {
    if (was_cleared()) {
      LOG_WARN("Posting to a handler which has been cleared");
      return;
      return;
    }
    }
    tasks_->emplace(std::move(closure));
    tasks_->emplace(std::move(closure));
+2 −2
Original line number Original line Diff line number Diff line
@@ -19,8 +19,8 @@ Queue<T>::Queue(size_t capacity) : enqueue_(capacity), dequeue_(0){};


template <typename T>
template <typename T>
Queue<T>::~Queue() {
Queue<T>::~Queue() {
  ASSERT(enqueue_.handler_ == nullptr);
  ASSERT_LOG(enqueue_.handler_ == nullptr, "Enqueue is not unregistered");
  ASSERT(dequeue_.handler_ == nullptr);
  ASSERT_LOG(dequeue_.handler_ == nullptr, "Dequeue is not unregistered");
};
};


template <typename T>
template <typename T>