Skip to content

Commit 6482bbf

Browse files
ozgengreenbonebot
authored andcommitted
use get data ID for scan report loading
1 parent dbf9910 commit 6482bbf

3 files changed

Lines changed: 7 additions & 10 deletions

File tree

src/gmp_scan_report.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,6 @@ get_scan_report_run (gmp_parser_t *gmp_parser,
598598
g_free (get_scan_report_data.get.subtype);
599599
get_scan_report_data.get.subtype = g_strdup ("report");
600600
response = manage_get_scan_report_summary (
601-
get_scan_report_data.get.id,
602601
&get_scan_report_data.get,
603602
&summary);
604603

src/manage_scan_report.c

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -315,30 +315,28 @@ resolve_get_report_controls (const get_data_t *get,
315315
/**
316316
* @brief Load a structured vulnerability report summary.
317317
*
318-
* @param[in] report_id UUID of the report.
319-
* @param[in] get GET command data.
318+
* @param[in] get GET command data.
320319
* @param[out] summary Loaded report summary.
321320
*
322321
* @return Status describing the result of the operation.
323322
*/
324323
manage_get_scan_report_response_t
325-
manage_get_scan_report_summary (const gchar *report_id,
326-
const get_data_t *get,
324+
manage_get_scan_report_summary (const get_data_t *get,
327325
report_summary_t *summary)
328326
{
329327
get_report_controls_t controls = {0};
330328
report_summary_t loaded_model = NULL;
331329
report_t report = 0;
332330
int ret;
333331

334-
if (report_id == NULL
335-
|| get == NULL
336-
|| summary == NULL)
332+
if (get == NULL
333+
|| summary == NULL
334+
|| get->id == NULL)
337335
return MANAGE_GET_SCAN_REPORT_ERROR;
338336

339337
*summary = NULL;
340338

341-
ret = find_report_with_permission (report_id,
339+
ret = find_report_with_permission (get->id,
342340
&report,
343341
"get_reports");
344342

src/manage_scan_report.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ void
179179
report_summary_free (report_summary_t);
180180

181181
manage_get_scan_report_response_t
182-
manage_get_scan_report_summary (const gchar *, const get_data_t *,
182+
manage_get_scan_report_summary (const get_data_t *,
183183
report_summary_t *);
184184

185185
const gchar *

0 commit comments

Comments
 (0)