1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-30 22:50:10 +03:00

FIx segmentation fault in oned service when configured to cache mode.

Before :
```
        if (!event.empty())
        {
            hm->trigger_send_event(event);
        }
```

After:
```
     if (!nd.is_cache())
    {
        if (!event.empty())
        {
            hm->trigger_send_event(event);
        }
    }
```

When nebula is cache HookManager isn't initialize, therfore ```hm``` equals to null.

(cherry picked from commit 9e6d755d733c6b065327480a56275775e389696c)
This commit is contained in:
alonbo2001 2023-08-18 12:20:04 +03:00 committed by Ruben S. Montero
parent 53fd81bfa3
commit d74ace5244
No known key found for this signature in database
GPG Key ID: A0CEA6FA880A1D87

@ -460,9 +460,12 @@ void Request::execute(
std::string event = HookAPI::format_message(method_name, pl, att);
if (!event.empty())
if (!nd.is_cache())
{
hm->trigger_send_event(event);
if (!event.empty())
{
hm->trigger_send_event(event);
}
}
if ( log_method_call )