From 020531a813a3c0658c4cc703f2ee919028b846db Mon Sep 17 00:00:00 2001 From: Jeffrey Date: Wed, 2 Mar 2022 16:13:40 -0600 Subject: [PATCH] Remove old defs of invoke_remote_command2() and notify_remote_command2() --- .../include/storages/levin_abstract_invoke2.h | 48 ------------------- 1 file changed, 48 deletions(-) diff --git a/contrib/epee/include/storages/levin_abstract_invoke2.h b/contrib/epee/include/storages/levin_abstract_invoke2.h index 383d67cc2..7fd786a53 100644 --- a/contrib/epee/include/storages/levin_abstract_invoke2.h +++ b/contrib/epee/include/storages/levin_abstract_invoke2.h @@ -56,54 +56,6 @@ namespace epee { namespace net_utils { -#if 0 - template - bool invoke_remote_command2(int command, const t_arg& out_struct, t_result& result_struct, t_transport& transport) - { - if(!transport.is_connected()) - return false; - - serialization::portable_storage stg; - out_struct.store(stg); - std::string buff_to_send, buff_to_recv; - stg.store_to_binary(buff_to_send); - - int res = transport.invoke(command, buff_to_send, buff_to_recv); - if( res <=0 ) - { - MERROR("Failed to invoke command " << command << " return code " << res); - return false; - } - serialization::portable_storage stg_ret; - if(!stg_ret.load_from_binary(buff_to_recv, &default_levin_limits)) - { - LOG_ERROR("Failed to load_from_binary on command " << command); - return false; - } - return result_struct.load(stg_ret); - } - - template - bool notify_remote_command2(int command, const t_arg& out_struct, t_transport& transport) - { - if(!transport.is_connected()) - return false; - - serialization::portable_storage stg; - out_struct.store(&stg); - std::string buff_to_send; - stg.store_to_binary(buff_to_send); - - int res = transport.notify(command, buff_to_send); - if(res <=0 ) - { - LOG_ERROR("Failed to notify command " << command << " return code " << res); - return false; - } - return true; - } -#endif - template bool invoke_remote_command2(const epee::net_utils::connection_context_base context, int command, const t_arg& out_struct, t_result& result_struct, t_transport& transport) {