mcproxy: uci config improvements and fixes
[feed/routing.git] / mcproxy / patches / 0002-uclibc-rm-stoi.patch
1 --- a/mcproxy/src/parser/parser.cpp
2 +++ b/mcproxy/src/parser/parser.cpp
3 @@ -126,7 +126,7 @@ void parser::parse_instance_definition(i
4 get_next_token();
5 if (m_current_token.get_type() == TT_STRING) {
6 try {
7 - table_number = std::stoi(m_current_token.get_string());
8 + table_number = atoi(m_current_token.get_string().c_str());
9 user_selected_table_number = true;
10 } catch (std::logic_error e) {
11 HC_LOG_ERROR("failed to parse line " << m_current_line << " table number: " << table_number << " is not a number");
12 @@ -299,7 +299,7 @@ std::unique_ptr<addr_match> parser::pars
13 get_next_token();
14 if (m_current_token.get_type() == TT_STRING) {
15 try {
16 - unsigned int prefix = std::stoi(m_current_token.get_string());
17 + unsigned int prefix = atoi(m_current_token.get_string().c_str());
18 if (prefix > 128) {
19 throw;
20 }
21 @@ -561,7 +561,7 @@ void parser::parse_interface_rule_match_
22 get_next_token();
23 if (m_current_token.get_type() == TT_STRING) {
24 try {
25 - int tmp_timeout = std::stoi(m_current_token.get_string());
26 + int tmp_timeout = atoi(m_current_token.get_string().c_str());
27 timeout = std::chrono::milliseconds(tmp_timeout);
28 } catch (...) {
29 error_notification();
30 --- a/mcproxy/src/utils/addr_storage.cpp
31 +++ b/mcproxy/src/utils/addr_storage.cpp
32 @@ -298,7 +298,7 @@ addr_storage& addr_storage::set_port(uin
33
34 addr_storage& addr_storage::set_port(const std::string& port)
35 {
36 - set_port(std::stoi(port.c_str()));
37 + set_port(atoi(port.c_str()));
38 return *this;
39 }
40