Commit 88b7499e authored by gauthier's avatar gauthier

cpp check 1st pass (in progress)

parent e28dbb7f
...@@ -30,8 +30,8 @@ ...@@ -30,8 +30,8 @@
class LoggerException : public std::runtime_error class LoggerException : public std::runtime_error
{ {
public: public:
LoggerException(const char *m) : std::runtime_error(m) {} explicit LoggerException(const char *m) : std::runtime_error(m) {}
LoggerException(const std::string &m) : std::runtime_error(m) {} explicit LoggerException(const std::string &m) : std::runtime_error(m) {}
}; };
class _Logger class _Logger
......
...@@ -3,11 +3,11 @@ ...@@ -3,11 +3,11 @@
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. * this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under * The OpenAirInterface Software Alliance licenses this file to You under
* the Apache License, Version 2.0 (the "License"); you may not use this file * the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. * except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.openairinterface.org/?page_id=698
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
......
...@@ -3,11 +3,11 @@ ...@@ -3,11 +3,11 @@
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. * this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under * The OpenAirInterface Software Alliance licenses this file to You under
* the Apache License, Version 2.0 (the "License"); you may not use this file * the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. * except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.openairinterface.org/?page_id=698
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
......
...@@ -3,11 +3,11 @@ ...@@ -3,11 +3,11 @@
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. * this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under * The OpenAirInterface Software Alliance licenses this file to You under
* the Apache License, Version 2.0 (the "License"); you may not use this file * the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. * except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.openairinterface.org/?page_id=698
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
......
...@@ -106,10 +106,10 @@ public: ...@@ -106,10 +106,10 @@ public:
gtpv1u_ie() : gtpv1u_ie() :
tlv() {} tlv() {}
gtpv1u_ie(const gtpv1u_tlv& t) : explicit gtpv1u_ie(const gtpv1u_tlv& t) :
tlv(t) {} tlv(t) {}
gtpv1u_ie(const uint8_t tlv_type) : explicit gtpv1u_ie(const uint8_t tlv_type) :
tlv() { tlv() {
tlv.type = tlv_type; tlv.type = tlv_type;
} }
...@@ -297,13 +297,13 @@ public: ...@@ -297,13 +297,13 @@ public:
remote_port(m.remote_port), remote_port(m.remote_port),
ies(m.ies) {} ies(m.ies) {}
gtpv1u_msg(const gtpv1u_msg_header& hdr) : gtpv1u_msg_header(hdr), remote_port(0), ies() {} explicit gtpv1u_msg(const gtpv1u_msg_header& hdr) : gtpv1u_msg_header(hdr), remote_port(0), ies() {}
gtpv1u_msg(const gtpv1u_echo_request& gtp_ies); explicit gtpv1u_msg(const gtpv1u_echo_request& gtp_ies);
gtpv1u_msg(const gtpv1u_echo_response& gtp_ies); explicit gtpv1u_msg(const gtpv1u_echo_response& gtp_ies);
gtpv1u_msg(const gtpv1u_error_indication& gtp_ies); explicit gtpv1u_msg(const gtpv1u_error_indication& gtp_ies);
gtpv1u_msg(const gtpv1u_supported_extension_headers_notification& gtp_ies); explicit gtpv1u_msg(const gtpv1u_supported_extension_headers_notification& gtp_ies);
gtpv1u_msg(const gtpv1u_end_marker& gtp_ies); explicit gtpv1u_msg(const gtpv1u_end_marker& gtp_ies);
~gtpv1u_msg() { ~gtpv1u_msg() {
ies.clear(); ies.clear();
...@@ -393,18 +393,18 @@ public: ...@@ -393,18 +393,18 @@ public:
uint8_t restart_counter; uint8_t restart_counter;
//-------- //--------
gtpv1u_recovery_ie(const core::recovery_t& i) : gtpv1u_ie(GTPU_IE_RECOVERY) { explicit gtpv1u_recovery_ie(const core::recovery_t& i) : gtpv1u_ie(GTPU_IE_RECOVERY) {
// avoid using b[] // avoid using b[]
restart_counter = i.restart_counter; restart_counter = i.restart_counter;
tlv.set_length(1); tlv.set_length(1);
}; };
//-------- //--------
gtpv1u_recovery_ie() : gtpv1u_ie(GTPU_IE_RECOVERY) { explicit gtpv1u_recovery_ie() : gtpv1u_ie(GTPU_IE_RECOVERY) {
restart_counter = 0; restart_counter = 0;
tlv.set_length(1); tlv.set_length(1);
}; };
//-------- //--------
gtpv1u_recovery_ie(const gtpv1u_tlv& t) : gtpv1u_ie(t) { explicit gtpv1u_recovery_ie(const gtpv1u_tlv& t) : gtpv1u_ie(t) {
restart_counter = 0; restart_counter = 0;
}; };
//-------- //--------
...@@ -437,7 +437,7 @@ public: ...@@ -437,7 +437,7 @@ public:
//-------- //--------
gtpv1u_tunnel_endpoint_identifier_data_i_ie(const core::tunnel_endpoint_identifier_data_i_t& i) : gtpv1u_ie(GTPU_IE_TUNNEL_ENDPOINT_IDENTIFIER_DATA_I) { explicit gtpv1u_tunnel_endpoint_identifier_data_i_ie(const core::tunnel_endpoint_identifier_data_i_t& i) : gtpv1u_ie(GTPU_IE_TUNNEL_ENDPOINT_IDENTIFIER_DATA_I) {
tunnel_endpoint_identifier_data_i = i.tunnel_endpoint_identifier_data_i; tunnel_endpoint_identifier_data_i = i.tunnel_endpoint_identifier_data_i;
} }
//-------- //--------
...@@ -445,7 +445,7 @@ public: ...@@ -445,7 +445,7 @@ public:
tunnel_endpoint_identifier_data_i = 0; tunnel_endpoint_identifier_data_i = 0;
}; };
//-------- //--------
gtpv1u_tunnel_endpoint_identifier_data_i_ie(const gtpv1u_tlv& t) : gtpv1u_ie(t) { explicit gtpv1u_tunnel_endpoint_identifier_data_i_ie(const gtpv1u_tlv& t) : gtpv1u_ie(t) {
tunnel_endpoint_identifier_data_i = 0; tunnel_endpoint_identifier_data_i = 0;
}; };
void to_core_type(core::tunnel_endpoint_identifier_data_i_t& c) { void to_core_type(core::tunnel_endpoint_identifier_data_i_t& c) {
...@@ -478,7 +478,7 @@ public: ...@@ -478,7 +478,7 @@ public:
struct in6_addr ipv6_address; struct in6_addr ipv6_address;
struct in_addr ipv4_address; struct in_addr ipv4_address;
//-------- //--------
gtpv1u_gtp_u_peer_address_ie(const core::gtp_u_peer_address_t& p) : explicit gtpv1u_gtp_u_peer_address_ie(const core::gtp_u_peer_address_t& p) :
gtpv1u_ie(GTPU_IE_GTP_U_PEER_ADDRESS){ gtpv1u_ie(GTPU_IE_GTP_U_PEER_ADDRESS){
is_v4 = p.is_v4; is_v4 = p.is_v4;
if (is_v4) { if (is_v4) {
...@@ -497,7 +497,7 @@ gtpv1u_ie(GTPU_IE_GTP_U_PEER_ADDRESS){ ...@@ -497,7 +497,7 @@ gtpv1u_ie(GTPU_IE_GTP_U_PEER_ADDRESS){
tlv.set_length(4); tlv.set_length(4);
} }
//-------- //--------
gtpv1u_gtp_u_peer_address_ie(const gtpv1u_tlv& t) : gtpv1u_ie(t) { explicit gtpv1u_gtp_u_peer_address_ie(const gtpv1u_tlv& t) : gtpv1u_ie(t) {
is_v4 = true; is_v4 = true;
ipv4_address.s_addr = INADDR_ANY; ipv4_address.s_addr = INADDR_ANY;
ipv6_address = in6addr_any; ipv6_address = in6addr_any;
...@@ -550,7 +550,7 @@ public: ...@@ -550,7 +550,7 @@ public:
std::string extension_value; std::string extension_value;
//-------- //--------
gtpv1u_private_extension_ie(const core::private_extension_t& i) : gtpv1u_ie(GTPU_IE_PRIVATE_EXTENSION), explicit gtpv1u_private_extension_ie(const core::private_extension_t& i) : gtpv1u_ie(GTPU_IE_PRIVATE_EXTENSION),
extension_identifier(i.enterprise_id), extension_identifier(i.enterprise_id),
extension_value(i.proprietary_value) extension_value(i.proprietary_value)
{ {
...@@ -564,7 +564,7 @@ public: ...@@ -564,7 +564,7 @@ public:
tlv.set_length(sizeof(extension_identifier)); tlv.set_length(sizeof(extension_identifier));
}; };
//-------- //--------
gtpv1u_private_extension_ie(const gtpv1u_tlv& t) : gtpv1u_ie(t), explicit gtpv1u_private_extension_ie(const gtpv1u_tlv& t) : gtpv1u_ie(t),
extension_identifier(0), extension_identifier(0),
extension_value() {} extension_value() {}
......
...@@ -3,11 +3,11 @@ ...@@ -3,11 +3,11 @@
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. * this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under * The OpenAirInterface Software Alliance licenses this file to You under
* the Apache License, Version 2.0 (the "License"); you may not use this file * the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. * except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.openairinterface.org/?page_id=698
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
......
...@@ -3,11 +3,11 @@ ...@@ -3,11 +3,11 @@
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. * this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under * The OpenAirInterface Software Alliance licenses this file to You under
* the Apache License, Version 2.0 (the "License"); you may not use this file * the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. * except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.openairinterface.org/?page_id=698
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
* For more information about the OpenAirInterface (OAI) Software Alliance: * For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org * contact@openairinterface.org
*/ */
/*! \file gtpv1u.cpp /*! \file gtpv1u.cpp
\brief \brief
\author Lionel Gauthier \author Lionel Gauthier
......
...@@ -3,11 +3,11 @@ ...@@ -3,11 +3,11 @@
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. * this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under * The OpenAirInterface Software Alliance licenses this file to You under
* the Apache License, Version 2.0 (the "License"); you may not use this file * the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. * except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.openairinterface.org/?page_id=698
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
...@@ -122,7 +122,7 @@ protected: ...@@ -122,7 +122,7 @@ protected:
// void handle_receive(const int& error, std::size_t bytes_transferred); // void handle_receive(const int& error, std::size_t bytes_transferred);
void handle_send(const char *, /*buffer*/ static void handle_send(const char *, /*buffer*/
const int& /*error*/, const int& /*error*/,
std::size_t /*bytes_transferred*/) std::size_t /*bytes_transferred*/)
{ {
......
...@@ -3,11 +3,11 @@ ...@@ -3,11 +3,11 @@
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. * this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under * The OpenAirInterface Software Alliance licenses this file to You under
* the Apache License, Version 2.0 (the "License"); you may not use this file * the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. * except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.openairinterface.org/?page_id=698
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
...@@ -66,7 +66,7 @@ public: ...@@ -66,7 +66,7 @@ public:
gtpv1u_echo_request(): private_extension() {} gtpv1u_echo_request(): private_extension() {}
gtpv1u_echo_request(const gtpv1u_echo_request& i) : private_extension(i.private_extension) {} gtpv1u_echo_request(const gtpv1u_echo_request& i) : private_extension(i.private_extension) {}
const char* get_msg_name() const {return "GTPU_ECHO_REQUEST";}; static const char* get_msg_name() {return "GTPU_ECHO_REQUEST";};
bool get(core::private_extension_t& v) const {if (private_extension.first) {v = private_extension.second;return true;}return false;} bool get(core::private_extension_t& v) const {if (private_extension.first) {v = private_extension.second;return true;}return false;}
...@@ -84,7 +84,7 @@ public: ...@@ -84,7 +84,7 @@ public:
gtpv1u_echo_response(): recovery(), private_extension() {} gtpv1u_echo_response(): recovery(), private_extension() {}
gtpv1u_echo_response(const gtpv1u_echo_response& i): recovery(i.recovery), private_extension(i.private_extension) {} gtpv1u_echo_response(const gtpv1u_echo_response& i): recovery(i.recovery), private_extension(i.private_extension) {}
const char* get_msg_name() const {return "GTPU_ECHO_RESPONSE";}; static const char* get_msg_name() {return "GTPU_ECHO_RESPONSE";};
bool get(core::recovery_t& v) const {if (recovery.first) {v = recovery.second;return true;}return false;} bool get(core::recovery_t& v) const {if (recovery.first) {v = recovery.second;return true;}return false;}
bool get(core::private_extension_t& v) const {if (private_extension.first) {v = private_extension.second;return true;}return false;} bool get(core::private_extension_t& v) const {if (private_extension.first) {v = private_extension.second;return true;}return false;}
...@@ -110,7 +110,7 @@ public: ...@@ -110,7 +110,7 @@ public:
gtp_u_peer_address(i.gtp_u_peer_address), gtp_u_peer_address(i.gtp_u_peer_address),
private_extension(i.private_extension) {} private_extension(i.private_extension) {}
const char* get_msg_name() const {return "GTPU_ERROR_INDICATION";}; static const char* get_msg_name() {return "GTPU_ERROR_INDICATION";};
bool get(core::tunnel_endpoint_identifier_data_i_t& v) const {if (tunnel_endpoint_identifier_data_i.first) {v = tunnel_endpoint_identifier_data_i.second;return true;}return false;} bool get(core::tunnel_endpoint_identifier_data_i_t& v) const {if (tunnel_endpoint_identifier_data_i.first) {v = tunnel_endpoint_identifier_data_i.second;return true;}return false;}
bool get(core::gtp_u_peer_address_t& v) const {if (gtp_u_peer_address.first) {v = gtp_u_peer_address.second;return true;}return false;} bool get(core::gtp_u_peer_address_t& v) const {if (gtp_u_peer_address.first) {v = gtp_u_peer_address.second;return true;}return false;}
...@@ -133,7 +133,7 @@ public: ...@@ -133,7 +133,7 @@ public:
gtpv1u_supported_extension_headers_notification(const gtpv1u_supported_extension_headers_notification& i) : gtpv1u_supported_extension_headers_notification(const gtpv1u_supported_extension_headers_notification& i) :
extension_header_type_list(i.extension_header_type_list) {} extension_header_type_list(i.extension_header_type_list) {}
const char* get_msg_name() const {return "GTPU_SUPPORTED_EXTENSION_HEADERS_NOTIFICATION";}; static const char* get_msg_name() {return "GTPU_SUPPORTED_EXTENSION_HEADERS_NOTIFICATION";};
bool get(core::extension_header_type_list_t& v) const {if (extension_header_type_list.first) {v = extension_header_type_list.second;return true;}return false;} bool get(core::extension_header_type_list_t& v) const {if (extension_header_type_list.first) {v = extension_header_type_list.second;return true;}return false;}
...@@ -150,10 +150,10 @@ public: ...@@ -150,10 +150,10 @@ public:
gtpv1u_end_marker() : gtpv1u_end_marker() :
private_extension() {} private_extension() {}
gtpv1u_end_marker(const gtpv1u_error_indication& i) : explicit gtpv1u_end_marker(const gtpv1u_error_indication& i) :
private_extension(i.private_extension) {} private_extension(i.private_extension) {}
const char* get_msg_name() const {return "GTPU_END_MARKER";}; static const char* get_msg_name() {return "GTPU_END_MARKER";};
bool get(core::private_extension_t& v) const {if (private_extension.first) {v = private_extension.second;return true;}return false;} bool get(core::private_extension_t& v) const {if (private_extension.first) {v = private_extension.second;return true;}return false;}
......
...@@ -363,7 +363,7 @@ pgw_app::pgw_app (const std::string& config_file) : m_s5s8_cp_teid_generator(), ...@@ -363,7 +363,7 @@ pgw_app::pgw_app (const std::string& config_file) : m_s5s8_cp_teid_generator(),
pgwc_sxab_inst = new pgwc_sxab(); pgwc_sxab_inst = new pgwc_sxab();
} catch (std::exception& e) { } catch (std::exception& e) {
Logger::pgwc_app().error( "Cannot create PGW_APP: %s", e.what() ); Logger::pgwc_app().error( "Cannot create PGW_APP: %s", e.what() );
throw e; throw;
} }
Logger::pgwc_app().startup( "Started" ); Logger::pgwc_app().startup( "Started" );
......
...@@ -92,7 +92,7 @@ private: ...@@ -92,7 +92,7 @@ private:
public: public:
pgw_app(const std::string& config_file); explicit pgw_app(const std::string& config_file);
pgw_app(pgw_app const&) = delete; pgw_app(pgw_app const&) = delete;
void operator=(pgw_app const&) = delete; void operator=(pgw_app const&) = delete;
......
...@@ -141,12 +141,12 @@ int pgw_config::load(const string& config_file) ...@@ -141,12 +141,12 @@ int pgw_config::load(const string& config_file)
catch(const FileIOException &fioex) catch(const FileIOException &fioex)
{ {
Logger::pgwc_app().error("I/O error while reading file %s - %s", config_file.c_str(), fioex.what()); Logger::pgwc_app().error("I/O error while reading file %s - %s", config_file.c_str(), fioex.what());
throw fioex; throw;
} }
catch(const ParseException &pex) catch(const ParseException &pex)
{ {
Logger::pgwc_app().error("Parse error at %s:%d - %s", pex.getFile(), pex.getLine(), pex.getError()); Logger::pgwc_app().error("Parse error at %s:%d - %s", pex.getFile(), pex.getLine(), pex.getError());
throw pex; throw;
} }
const Setting& root = cfg.getRoot(); const Setting& root = cfg.getRoot();
......
...@@ -275,7 +275,7 @@ sgwc_app::sgwc_app (const std::string& config_file) : s11lteid2sgw_eps_bearer_co ...@@ -275,7 +275,7 @@ sgwc_app::sgwc_app (const std::string& config_file) : s11lteid2sgw_eps_bearer_co
#endif #endif
} catch (std::exception& e) { } catch (std::exception& e) {
Logger::sgwc_app().error( "Cannot create SGW_APP: %s", e.what() ); Logger::sgwc_app().error( "Cannot create SGW_APP: %s", e.what() );
throw e; throw;
} }
if (itti_inst->create_task(TASK_SGWC_APP, sgwc_app_task, nullptr) ) { if (itti_inst->create_task(TASK_SGWC_APP, sgwc_app_task, nullptr) ) {
......
...@@ -96,7 +96,7 @@ public: ...@@ -96,7 +96,7 @@ public:
//gtpv1u_data_t gtpv1u_data; //gtpv1u_data_t gtpv1u_data;
sgwc_app(const std::string& config_file); explicit sgwc_app(const std::string& config_file);
~sgwc_app(); ~sgwc_app();
sgwc_app(sgwc_app const&) = delete; sgwc_app(sgwc_app const&) = delete;
void operator=(sgwc_app const&) = delete; void operator=(sgwc_app const&) = delete;
......
...@@ -108,12 +108,12 @@ int sgwc_config::load(const string& config_file) ...@@ -108,12 +108,12 @@ int sgwc_config::load(const string& config_file)
catch(const FileIOException &fioex) catch(const FileIOException &fioex)
{ {
Logger::sgwc_app().error("I/O error while reading file %s - %s", config_file.c_str(), fioex.what()); Logger::sgwc_app().error("I/O error while reading file %s - %s", config_file.c_str(), fioex.what());
throw fioex; throw;
} }
catch(const ParseException &pex) catch(const ParseException &pex)
{ {
Logger::sgwc_app().error("Parse error at %s:%d - %s", pex.getFile(), pex.getLine(), pex.getError()); Logger::sgwc_app().error("Parse error at %s:%d - %s", pex.getFile(), pex.getLine(), pex.getError());
throw pex; throw;
} }
const Setting& root = cfg.getRoot(); const Setting& root = cfg.getRoot();
......
...@@ -146,7 +146,7 @@ public: ...@@ -146,7 +146,7 @@ public:
void remove_eps_bearer(const core::ebi_t& ebi); void remove_eps_bearer(const core::ebi_t& ebi);
void remove_eps_bearer(std::shared_ptr<sgw_eps_bearer> bearer); void remove_eps_bearer(std::shared_ptr<sgw_eps_bearer> bearer);
void delete_bearers(); void delete_bearers();
bool is_released() {return is_dl_up_tunnels_released;} bool is_released() const {return is_dl_up_tunnels_released;}
//core::fteid_t generate_s5s8_up_fteid(const struct in_addr ipv4_address, const core::bearer_qos_t& bearer_qos); //core::fteid_t generate_s5s8_up_fteid(const struct in_addr ipv4_address, const core::bearer_qos_t& bearer_qos);
void deallocate_ressources(); void deallocate_ressources();
......
...@@ -52,7 +52,7 @@ public: ...@@ -52,7 +52,7 @@ public:
bool marked_for_removal; bool marked_for_removal;
sebc_procedure(){gtpc_tx_id = generate_trxn_id();marked_for_removal = false;} sebc_procedure(){gtpc_tx_id = generate_trxn_id();marked_for_removal = false;}
sebc_procedure(uint64_t tx_id){gtpc_tx_id = tx_id;marked_for_removal = false;} explicit sebc_procedure(uint64_t tx_id){gtpc_tx_id = tx_id;marked_for_removal = false;}
virtual ~sebc_procedure(){} virtual ~sebc_procedure(){}
virtual core::itti::itti_msg_type_t get_procedure_type(){return core::itti::ITTI_MSG_TYPE_NONE;} virtual core::itti::itti_msg_type_t get_procedure_type(){return core::itti::ITTI_MSG_TYPE_NONE;}
virtual bool has_trxn_id(const uint64_t trxn_id) {return (trxn_id == gtpc_tx_id);} virtual bool has_trxn_id(const uint64_t trxn_id) {return (trxn_id == gtpc_tx_id);}
...@@ -70,7 +70,7 @@ class sgw_pdn_connection; ...@@ -70,7 +70,7 @@ class sgw_pdn_connection;
class create_session_request_procedure : public sebc_procedure { class create_session_request_procedure : public sebc_procedure {
public: public:
create_session_request_procedure(core::itti::itti_s11_create_session_request& msg) : sebc_procedure(msg.gtpc_tx_id), msg(msg), ebc(nullptr) {} explicit create_session_request_procedure(core::itti::itti_s11_create_session_request& msg) : sebc_procedure(msg.gtpc_tx_id), msg(msg), ebc(nullptr) {}
int run(std::shared_ptr<sgw_eps_bearer_context> ebc); int run(std::shared_ptr<sgw_eps_bearer_context> ebc);
void handle_itti_msg (core::itti::itti_s5s8_create_session_response& csresp, std::shared_ptr<sgw_eps_bearer_context> ebc, std::shared_ptr<sgw_pdn_connection> spc); void handle_itti_msg (core::itti::itti_s5s8_create_session_response& csresp, std::shared_ptr<sgw_eps_bearer_context> ebc, std::shared_ptr<sgw_pdn_connection> spc);
...@@ -93,7 +93,7 @@ public: ...@@ -93,7 +93,7 @@ public:
class modify_bearer_request_procedure : public sebc_procedure { class modify_bearer_request_procedure : public sebc_procedure {
public: public:
modify_bearer_request_procedure(core::itti::itti_s11_modify_bearer_request& msg) : sebc_procedure(msg.gtpc_tx_id), msg(msg), explicit modify_bearer_request_procedure(core::itti::itti_s11_modify_bearer_request& msg) : sebc_procedure(msg.gtpc_tx_id), msg(msg),
pdn_bearers(), null_pdn_bearers(), ebc(), bearer_contexts_modified(), bearer_contexts_marked_for_removal() {} pdn_bearers(), null_pdn_bearers(), ebc(), bearer_contexts_modified(), bearer_contexts_marked_for_removal() {}
bool has_trxn_id(const uint64_t trxn_id); bool has_trxn_id(const uint64_t trxn_id);
...@@ -121,7 +121,7 @@ public: ...@@ -121,7 +121,7 @@ public:
class release_access_bearers_request_procedure : public sebc_procedure { class release_access_bearers_request_procedure : public sebc_procedure {
public: public:
release_access_bearers_request_procedure(core::itti::itti_s11_release_access_bearers_request& msg) : sebc_procedure(msg.gtpc_tx_id), msg(msg), explicit release_access_bearers_request_procedure(core::itti::itti_s11_release_access_bearers_request& msg) : sebc_procedure(msg.gtpc_tx_id), msg(msg),
bearers(), ebc(), cause() {} bearers(), ebc(), cause() {}
bool has_trxn_id(const uint64_t trxn_id); bool has_trxn_id(const uint64_t trxn_id);
int run(std::shared_ptr<sgw_eps_bearer_context> ebc); int run(std::shared_ptr<sgw_eps_bearer_context> ebc);
......
...@@ -126,19 +126,19 @@ spgwu_app::spgwu_app (const std::string& config_file) ...@@ -126,19 +126,19 @@ spgwu_app::spgwu_app (const std::string& config_file)
spgwu_sx_inst = new spgwu_sx(); spgwu_sx_inst = new spgwu_sx();
} catch (std::exception& e) { } catch (std::exception& e) {
Logger::spgwu_app().error( "Cannot create SPGWU_SX: %s", e.what() ); Logger::spgwu_app().error( "Cannot create SPGWU_SX: %s", e.what() );
throw e; throw;
} }
try { try {
spgwu_s1u_inst = new spgwu_s1u(); spgwu_s1u_inst = new spgwu_s1u();
} catch (std::exception& e) { } catch (std::exception& e) {
Logger::spgwu_app().error( "Cannot create SPGWU_S1U: %s", e.what() ); Logger::spgwu_app().error( "Cannot create SPGWU_S1U: %s", e.what() );
throw e; throw;
} }
try { try {
pfcp_switch_inst = new pfcp_switch(); pfcp_switch_inst = new pfcp_switch();
} catch (std::exception& e) { } catch (std::exception& e) {
Logger::spgwu_app().error( "Cannot create PFCP_SWITCH: %s", e.what() ); Logger::spgwu_app().error( "Cannot create PFCP_SWITCH: %s", e.what() );
throw e; throw;
} }
Logger::spgwu_app().startup( "Started" ); Logger::spgwu_app().startup( "Started" );
} }
......
...@@ -95,7 +95,7 @@ public: ...@@ -95,7 +95,7 @@ public:
//gtpv1u_data_t gtpv1u_data; //gtpv1u_data_t gtpv1u_data;
spgwu_app(const std::string& config_file); explicit spgwu_app(const std::string& config_file);
~spgwu_app(); ~spgwu_app();
spgwu_app(spgwu_app const&) = delete; spgwu_app(spgwu_app const&) = delete;
void operator=(spgwu_app const&) = delete; void operator=(spgwu_app const&) = delete;
......
...@@ -147,12 +147,12 @@ int spgwu_config::load(const string& config_file) ...@@ -147,12 +147,12 @@ int spgwu_config::load(const string& config_file)
catch(const FileIOException &fioex) catch(const FileIOException &fioex)
{ {
Logger::spgwu_app().error("I/O error while reading file %s - %s", config_file.c_str(), fioex.what()); Logger::spgwu_app().error("I/O error while reading file %s - %s", config_file.c_str(), fioex.what());
throw fioex; throw;
} }
catch(const ParseException &pex) catch(const ParseException &pex)
{ {
Logger::spgwu_app().error("Parse error at %s:%d - %s", pex.getFile(), pex.getLine(), pex.getError()); Logger::spgwu_app().error("Parse error at %s:%d - %s", pex.getFile(), pex.getLine(), pex.getError());
throw pex; throw;
} }
const Setting& root = cfg.getRoot(); const Setting& root = cfg.getRoot();
......
...@@ -55,7 +55,7 @@ namespace oai::cn::nf::spgwu { ...@@ -55,7 +55,7 @@ namespace oai::cn::nf::spgwu {
oai::cn::core::itti::timer_id_t timer_association; oai::cn::core::itti::timer_id_t timer_association;
pfcp_association(const oai::cn::core::pfcp::node_id_t& node_id) : explicit pfcp_association(const oai::cn::core::pfcp::node_id_t& node_id) :
node_id(node_id), recovery_time_stamp(), function_features(), m_sessions(), sessions() { node_id(node_id), recovery_time_stamp(), function_features(), m_sessions(), sessions() {
hash_node_id = std::hash<oai::cn::core::pfcp::node_id_t>{}(node_id); hash_node_id = std::hash<oai::cn::core::pfcp::node_id_t>{}(node_id);
timer_heartbeat = ITTI_INVALID_TIMER_ID; timer_heartbeat = ITTI_INVALID_TIMER_ID;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment