From 666092b3195e138ae30621a51665dcd96e56dffd Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 17 Feb 2017 14:49:41 +0000 Subject: [PATCH 8/9] activation-helper: Rename bus_config_parser_get_service_dirs I'm about to change the version in the full-fat parser to return BusServiceDir structs. Name this one with "paths" instead, to avoid confusion. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=99825 Reviewed-by: Philip Withnall [smcv: add a brief doc-comment] Signed-off-by: Simon McVittie --- bus/activation-helper.c | 2 +- bus/config-parser-trivial.c | 7 +++++-- bus/config-parser-trivial.h | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/bus/activation-helper.c b/bus/activation-helper.c index 394f3938..5b6a0908 100644 --- a/bus/activation-helper.c +++ b/bus/activation-helper.c @@ -80,7 +80,7 @@ desktop_file_for_name (BusConfigParser *parser, goto out; } - service_dirs = bus_config_parser_get_service_dirs (parser); + service_dirs = bus_config_parser_get_service_paths (parser); for (link = _dbus_list_get_first_link (service_dirs); link != NULL; link = _dbus_list_get_next_link (service_dirs, link)) diff --git a/bus/config-parser-trivial.c b/bus/config-parser-trivial.c index d085fe7f..dd65c6d4 100644 --- a/bus/config-parser-trivial.c +++ b/bus/config-parser-trivial.c @@ -367,8 +367,11 @@ bus_config_parser_get_type (BusConfigParser *parser) return _dbus_string_get_const_data (&parser->bus_type); } +/* + * @returns A list of strings, owned by the BusConfigParser + */ DBusList** -bus_config_parser_get_service_dirs (BusConfigParser *parser) +bus_config_parser_get_service_paths (BusConfigParser *parser) { return &parser->service_dirs; } @@ -441,7 +444,7 @@ check_return_values (const DBusString *full_path) printf (" system OKAY!\n"); /* check dirs return value is okay */ - dirs = bus_config_parser_get_service_dirs (parser); + dirs = bus_config_parser_get_service_paths (parser); if (dirs == NULL) { _dbus_warn ("Service dirs are NULL!"); diff --git a/bus/config-parser-trivial.h b/bus/config-parser-trivial.h index 31ddef6b..abe41fdf 100644 --- a/bus/config-parser-trivial.h +++ b/bus/config-parser-trivial.h @@ -59,7 +59,7 @@ dbus_bool_t bus_config_parser_finished (BusConfigParser *parser, /* Functions for extracting the parse results */ const char* bus_config_parser_get_user (BusConfigParser *parser); const char* bus_config_parser_get_type (BusConfigParser *parser); -DBusList** bus_config_parser_get_service_dirs (BusConfigParser *parser); +DBusList** bus_config_parser_get_service_paths (BusConfigParser *parser); /* Loader functions (backended off one of the XML parsers). Returns a * finished ConfigParser. -- 2.11.0