Skip to content

Commit

Permalink
Added comment for tcpdump.sh and moved some messages to LOG_ERROR
Browse files Browse the repository at this point in the history
  • Loading branch information
EDDragonWolf committed Feb 21, 2018
1 parent 29e357b commit 6643dc2
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions run_tcpdump.sh
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
# Make sure that eth0 interface exists and supernode is connecting to 28900 port.
nohup sudo tcpdump -i eth0 'port 28900' -v &> ./logs/tcpdump28900.log &
2 changes: 1 addition & 1 deletion src/supernode/DAPI_RPC_Client.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ namespace supernode {

WasConnected = false;
if(!invoke(rpc_command::DAPI_URI, rpc_command::DAPI_METHOD, req_param, timeout, std::addressof(pri))) {
LOG_PRINT_L4("Failed to invoke http request to " << call<<" URI: "<<m_URI);
LOG_ERROR("Failed to invoke http request to " << call<<" URI: "<<m_URI);
return false;
}
WasConnected = true;
Expand Down
6 changes: 3 additions & 3 deletions src/supernode/DAPI_RPC_Server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ bool supernode::DAPI_RPC_Server::HandleRequest(const epee::net_utils::http::http
epee::serialization::storage_entry id_ = epee::serialization::storage_entry(std::string());

if( !ps.load_from_json(query_info.m_body) ) {
LOG_PRINT_L0("!load_from_json");
LOG_ERROR("!load_from_json");
response_info.m_response_code = 500;
response_info.m_response_comment = "Parse error";
} else if( !ps.get_value("dapi_version", version, nullptr) ) {
Expand Down Expand Up @@ -108,8 +108,8 @@ bool supernode::DAPI_RPC_Server::HandleRequest(const epee::net_utils::http::http
}
LOG_PRINT_L2(response_info.m_body);

if(!handler) { LOG_PRINT_L4("handler not found for: "<<callback_name); return false; }
if( !handler->Process(ps, response_info.m_body) ) { LOG_PRINT_L4("Fail to process (ret false): "<<callback_name); return false; }
if(!handler) { LOG_ERROR("handler not found for: "<<callback_name); return false; }
if( !handler->Process(ps, response_info.m_body) ) { LOG_ERROR("Fail to process (ret false): "<<callback_name); return false; }

response_info.m_mime_tipe = "application/json";
response_info.m_header_info.m_content_type = " application/json";
Expand Down
2 changes: 1 addition & 1 deletion src/supernode/PosProxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ bool supernode::PosProxy::Sale(const rpc_command::POS_SALE::request& in, rpc_com
if (!data->Init(in))
{
out.Result = ERROR_SALE_REQUEST_FAILED;
LOG_PRINT_L0("ERROR_SALE_REQUEST_FAILED");
LOG_ERROR("ERROR_SALE_REQUEST_FAILED");
return false;
}
Add(data);
Expand Down
2 changes: 1 addition & 1 deletion src/supernode/PosSaleObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ void supernode::PosSaleObject::ContinueInit() {
inbr.SenderIP = m_DAPIServer->IP();
inbr.SenderPort = m_DAPIServer->Port();
if( !m_SubNetBroadcast.Send(dapi_call::PosProxySale, inbr, outv) || outv.empty() ) {
LOG_PRINT_L0("!Send dapi_call::PosProxySale");
LOG_ERROR("!Send dapi_call::PosProxySale");
m_Status = NTransactionStatus::Fail;

}
Expand Down

0 comments on commit 6643dc2

Please sign in to comment.