Smalls improvements
[apps/agl-service-can-low-level.git] / low-can-binding / diagnostic / diagnostic-manager.cpp
index 8932f25..55e6108 100644 (file)
@@ -188,6 +188,8 @@ void diagnostic_manager_t::find_and_erase(active_diagnostic_request_t* entry, st
 void diagnostic_manager_t::cancel_request(active_diagnostic_request_t* entry)
 {
        entry->get_socket().close();
+       if(entry->get_handle())
+               delete(entry->get_handle());
        delete entry;
        entry = nullptr;
 }
@@ -256,7 +258,7 @@ active_diagnostic_request_t* diagnostic_manager_t::find_recurring_request(Diagno
        }
        return nullptr;
 }
-
+/*
 /// @brief Add and send a new one-time diagnostic request. DON'T USED AT THIS TIME
 ///
 /// A one-time (aka non-recurring) request can existing in parallel with a
@@ -313,7 +315,7 @@ active_diagnostic_request_t* diagnostic_manager_t::add_request(DiagnosticRequest
        }
        return entry;
 }
-
+*/
 /// @brief Validate frequency asked don't get higher than the maximum of a classical
 /// CAN bus OBD2 request.
 ///