Skip to content

Commit

Permalink
Use _opts_t style interface.
Browse files Browse the repository at this point in the history
  • Loading branch information
jjnicola committed Aug 26, 2019
1 parent 6e9e432 commit d2884d6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
8 changes: 4 additions & 4 deletions osp/osp.c
Original file line number Diff line number Diff line change
Expand Up @@ -455,20 +455,20 @@ osp_delete_scan (osp_connection_t *connection, const char *scan_id)
* @return Osp scan status
*/
osp_scan_status_t
osp_get_scan_status (osp_connection_t *connection, const char *scan_id,
char **error)
osp_get_scan_status_ext (osp_connection_t *connection,
osp_get_scan_status_opts_t opts, char **error)
{
entity_t entity, child;
int rc;
osp_scan_status_t status = OSP_SCAN_STATUS_ERROR;

assert (connection);
assert (scan_id);
assert (opts.scan_id);
rc = osp_send_command (connection, &entity,
"<get_scans scan_id='%s'"
" details='0'"
" pop_results='0'/>",
scan_id);
opts.scan_id);

if (rc)
{
Expand Down
8 changes: 7 additions & 1 deletion osp/osp.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,14 @@ osp_get_scan_pop (osp_connection_t *,
int,
char **);

typedef struct {
const char *scan_id; ///< UUID of the scan which get the status from.
} osp_get_scan_status_opts_t;

osp_scan_status_t
osp_get_scan_status (osp_connection_t *, const char *, char **);
osp_get_scan_status_ext (osp_connection_t *,
osp_get_scan_status_opts_t,
char **);

int
osp_delete_scan (osp_connection_t *, const char *);
Expand Down

0 comments on commit d2884d6

Please sign in to comment.