unit control: Fix 'start' action with wildcard error reporting 46/207546/3 accepted/tizen/unified/20190610.110243 submit/tizen/20190610.021921 submit/tizen/20190611.020020
authorMaciej Slodczyk <m.slodczyk2@partner.samsung.com>
Thu, 6 Jun 2019 17:10:33 +0000 (19:10 +0200)
committerMaciej Slodczyk <m.slodczyk2@partner.samsung.com>
Fri, 7 Jun 2019 09:34:39 +0000 (11:34 +0200)
Change-Id: Id18af6a7f8fc0fc36fba66559401ab5125a3099d
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
src/decision_makers/unit_control_dm.c

index 4e0f1992da5218ded444d6e7f4ed58661cc8bbc2..149770f475e13c8c8e282b6da894d122752b6863 100644 (file)
@@ -398,16 +398,16 @@ static int unit_control_make_decision(struct epc_event_handler *handler)
        struct unit_control_decision_maker *dm = container_of(handler,
                        struct unit_control_decision_maker, eh);
        struct unit_control_event *ev = to_unit_control_event(event);
-       int ret = -EACCES;
+       int ret = 0;
        bool matched = false;
-       int     error_code = 0;
+       int error_code = 0;
        struct whitelist_entry *w;
        _cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
        char *service_name;
 
        /* cannot use start with wildcards */
        if (!strcmp(ev->method, "start") && strstr(ev->unit, "@.")) {
-               ret = -ENOTSUP;
+               error_code = -ENOTSUP;
                goto cleanup;
        }