Change-Id: I4a33b6d5f1f3b73af113aff62b024329b0ed5288
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
if( adr != nullptr)
configuration_t::instance().get_diagnostic_manager().cleanup_request(adr, true);
}
+ delete diag_req;
+ diag_req = nullptr;
}
static void push_n_notify(const can_message_t& cm)
diag_m.cleanup_request(
diag_m.find_recurring_request(diag_req), true);
WARNING(binder_interface, "%s: signal: %s isn't supported. Canceling operation.", __FUNCTION__, sig->get_name().c_str());
+ delete diag_req;
+ diag_req = nullptr;
return -1;
}
timeout_clock_{frequency_clock_t(10)}
{}
+active_diagnostic_request_t::~active_diagnostic_request_t()
+{
+ socket_.close();
+ delete handle_;
+ handle_ = nullptr;
+}
+
uint32_t active_diagnostic_request_t::get_id() const
{
return id_;
const std::string& name, bool wait_for_multiple_responses,
const DiagnosticResponseDecoder decoder,
const DiagnosticResponseCallback callback, float frequencyHz);
+ ~active_diagnostic_request_t();
uint32_t get_id() const;
DiagnosticRequestHandle* get_handle();
void diagnostic_manager_t::cancel_request(active_diagnostic_request_t* entry)
{
entry->get_socket().close();
+ delete entry;
+ entry = nullptr;
}
/// @brief Cleanup a specific request if it isn't running and get complete. As it is almost