Skip to content

Commit

Permalink
Remove stray details checks from GET_ASSETS
Browse files Browse the repository at this point in the history
The details attribute is store in get_assets_data->get.details. These
checks on get_assets_data->details are probably copy-paste errors from
GET_INFO. This works in GET_INFO because GET_INFO explicitly sets
details alongside get.details.

As a result the DETAILS element has never been returned from
GET_ASSETS. It's also missing from the docs.

Similarly, ROUTES is only returned from GET_ASSETS when an id
attribute is given, regardless of the value of the details attribute.
  • Loading branch information
mattmundell authored and a-h-abdelsalam committed Sep 4, 2024
1 parent acb6709 commit 1b09ee5
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/gmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -11905,7 +11905,7 @@ handle_get_assets (gmp_parser_t *gmp_parser, GError **error)
(&details));
cleanup_iterator (&details);

if (get_assets_data->details || get_assets_data->get.id)
if (get_assets_data->get.id)
{
routes_xml = host_routes_xml (asset);
g_string_append (result, routes_xml);
Expand All @@ -11923,9 +11923,6 @@ handle_get_assets (gmp_parser_t *gmp_parser, GError **error)
}
cleanup_iterator (&assets);

if (get_assets_data->details == 1)
SEND_TO_CLIENT_OR_FAIL ("<details>1</details>");

filtered = get_assets_data->get.id
? 1
: asset_count (&get_assets_data->get);
Expand Down

0 comments on commit 1b09ee5

Please sign in to comment.