From 36c45c7d64ce7c12a1637c2848e6a723aaee72ba Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Thu, 28 Nov 2019 11:10:38 +0000 Subject: [PATCH] added the changes in the enb stack from next --- srsenb/src/stack/enb_stack_lte.cc | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/srsenb/src/stack/enb_stack_lte.cc b/srsenb/src/stack/enb_stack_lte.cc index 95d5c7262..a9811f36b 100644 --- a/srsenb/src/stack/enb_stack_lte.cc +++ b/srsenb/src/stack/enb_stack_lte.cc @@ -248,8 +248,10 @@ void enb_stack_lte::remove_mme_socket(int fd) void enb_stack_lte::add_gtpu_s1u_socket_handler(int fd) { auto gtpu_s1u_handler = [this](srslte::unique_byte_buffer_t pdu, const sockaddr_in& from) { - auto task_handler = [this, from](task_t* t) { gtpu.handle_gtpu_s1u_rx_packet(std::move(t->pdu), from); }; - pending_tasks.push(gtpu_queue_id, task_t{task_handler, std::move(pdu)}); + auto task_handler = [this, from](srslte::unique_byte_buffer_t& t) { + gtpu.handle_gtpu_s1u_rx_packet(std::move(t), from); + }; + pending_tasks.push(gtpu_queue_id, std::bind(task_handler, std::move(pdu))); }; rx_sockets->add_socket_pdu_handler(fd, gtpu_s1u_handler); } @@ -257,15 +259,17 @@ void enb_stack_lte::add_gtpu_s1u_socket_handler(int fd) void enb_stack_lte::add_gtpu_m1u_socket_handler(int fd) { auto gtpu_m1u_handler = [this](srslte::unique_byte_buffer_t pdu, const sockaddr_in& from) { - auto task_handler = [this, from](task_t* t) { gtpu.handle_gtpu_m1u_rx_packet(std::move(t->pdu), from); }; - pending_tasks.push(gtpu_queue_id, task_t{task_handler, std::move(pdu)}); + auto task_handler = [this, from](srslte::unique_byte_buffer_t& t) { + gtpu.handle_gtpu_m1u_rx_packet(std::move(t), from); + }; + pending_tasks.push(gtpu_queue_id, std::bind(task_handler, std::move(pdu))); }; rx_sockets->add_socket_pdu_handler(fd, gtpu_m1u_handler); } void enb_stack_lte::process_pdus() { - pending_tasks.push(mac_queue_id, task_t{[this](task_t*) { mac.process_pdus(); }}); + pending_tasks.push(mac_queue_id, [this]() { mac.process_pdus(); }); } } // namespace srsenb