Add CMake option to compile with J1939
[apps/agl-service-can-low-level.git] / low-can-binding / diagnostic / diagnostic-manager.cpp
index 55e6108..65afecf 100644 (file)
@@ -123,7 +123,7 @@ bool diagnostic_manager_t::shims_send(const uint32_t arbitration_id, const uint8
 
        bcm_msg.frames[0] = cf;
 
-       tx_socket << bcm_msg;
+       tx_socket.write_message(bcm_msg);
        if(tx_socket)
                return true;
        return false;
@@ -188,8 +188,6 @@ 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;
 }