Skip to content

Commit

Permalink
Check filter before using it in osp_get_vts_ext
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmundell authored and jjnicola committed Sep 23, 2019
1 parent a9b645e commit ea9c2ed
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions osp/osp.c
Original file line number Diff line number Diff line change
Expand Up @@ -405,9 +405,15 @@ osp_get_vts_ext (osp_connection_t *connection, osp_get_vts_opts_t opts, entity_t
if (vts == NULL)
return 1;

if (osp_send_command (connection, vts, "<get_vts filter='%s'/>", opts.filter))
return 1;
if (opts.filter)
{
if (osp_send_command (connection, vts, "<get_vts filter='%s'/>", opts.filter))
return 1;
return 0;
}

if (osp_send_command (connection, vts, "<get_vts/>"))
return 1;
return 0;
}

Expand Down

0 comments on commit ea9c2ed

Please sign in to comment.