Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move openvasd_start_scan warning up in case the cJSON err is empty #866

Merged
merged 1 commit into from
Jan 15, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion openvasd/openvasd.c
Original file line number Diff line number Diff line change
Expand Up @@ -810,6 +810,7 @@ openvasd_start_scan (openvasd_connector_t conn, gchar *data)
if (!parser)
{
const gchar *error_ptr = cJSON_GetErrorPtr ();
g_warning ("%s: Error parsing json string to get the scan ID", __func__);
if (error_ptr != NULL)
{
response->body = g_strdup_printf ("{\"error\": \"%s\"}", error_ptr);
Expand All @@ -819,7 +820,6 @@ openvasd_start_scan (openvasd_connector_t conn, gchar *data)
{
response->body = g_strdup (
"{\"error\": \"Parsing json string to get the scan ID\"}");
g_warning ("%s: Parsing json string to get the scan ID", __func__);
}
response->code = RESP_CODE_ERR;
cJSON_Delete (parser);
Expand Down
Loading