~xnox/ubuntu-app-launch/sync-archive

« back to all changes in this revision

Viewing changes to untrusted-helper-type-end.c

Grabbing updated untrusted helper

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
        int i;
38
38
        for (i = 0; appids[i] != NULL; i++) {
39
39
                gchar ** instances = upstart_app_launch_list_helper_instances(type, appids[i]);
 
40
                guint instance_cnt = g_strv_length(instances);
40
41
 
41
 
                if (g_strv_length(instances) == 0) {
 
42
                if (instance_cnt == 0) {
42
43
                        g_debug("Stopping %s", appids[i]);
43
44
                        if (!upstart_app_launch_stop_helper(type, appids[i])) {
44
45
                                g_warning("Unable to stop '%s'", appids[i]);
45
46
                        }
46
47
                } else {
47
48
                        int j;
48
 
                        for (j = 0; j < g_strv_length(instances); j++) {
 
49
                        for (j = 0; j < instance_cnt; j++) {
49
50
                                g_debug("Stopping %s (%s)", appids[i], instances[j]);
50
51
                                if (!upstart_app_launch_stop_multiple_helper(type, appids[i], instances[j])) {
51
52
                                        g_warning("Unable to stop '%s' instance '%s'", appids[i], instances[j]);