Changed log to debug. Changed mutex to lock guard.

This commit is contained in:
Pedro Alvarez 2019-06-07 14:46:01 +01:00 committed by Andre Puschmann
parent 6d05265d92
commit 22139afe09
1 changed files with 5 additions and 8 deletions

View File

@ -223,8 +223,7 @@ int gw::apply_traffic_flow_template(const uint8_t&
const uint8_t& lcid,
const LIBLTE_MME_TRAFFIC_FLOW_TEMPLATE_STRUCT* tft)
{
int err = SRSLTE_SUCCESS;
tft_mutex.lock();
std::lock_guard<std::mutex> lock(tft_mutex);
switch (tft->tft_op_code) {
case LIBLTE_MME_TFT_OPERATION_CODE_CREATE_NEW_TFT:
for (int i = 0; i < tft->packet_filter_list_size; i++) {
@ -233,17 +232,15 @@ int gw::apply_traffic_flow_template(const uint8_t&
auto it = tft_filter_map.insert(std::make_pair(filter.eval_precedence, filter));
if (it.second == false) {
gw_log->error("Error inserting TFT Packet Filter\n");
err = SRSLTE_ERROR_CANT_START;
break;
return SRSLTE_ERROR_CANT_START;
}
}
break;
default:
gw_log->error("Unhandled TFT OP code\n");
err = SRSLTE_ERROR_CANT_START;
return SRSLTE_ERROR_CANT_START;
}
tft_mutex.unlock();
return err;
return SRSLTE_SUCCESS;
}
/*******************************************************************************
@ -363,7 +360,7 @@ uint8_t gw::check_tft_filter_match(const srslte::unique_byte_buffer_t& pdu) {
bool match = filter_pair.second.match(pdu);
if (match) {
lcid = filter_pair.second.lcid;
gw_log->info("Found filter match -- EPS bearer Id %d, LCID %d\n", filter_pair.second.eps_bearer_id, lcid);
gw_log->debug("Found filter match -- EPS bearer Id %d, LCID %d\n", filter_pair.second.eps_bearer_id, lcid);
break;
}
}