Lines Matching refs:mt_ctx
111 struct mt_ctx *mt_ctx;
157 struct mt_ctx *mt_ctx;
160 struct mt_ctx {
193 static int get_service_config(struct mt_ctx *ctx, const char *name,
195 static int get_provider_config(struct mt_ctx *ctx, const char *name,
197 static int add_new_service(struct mt_ctx *ctx,
200 static int add_new_provider(struct mt_ctx *ctx,
213 struct mt_ctx *ctx = (struct mt_ctx *) cb_data;
237 struct mt_ctx *ctx;
425 if (svc->mt_ctx) {
426 DLIST_REMOVE(svc->mt_ctx->svc_list, svc);
441 && svc->mt_ctx != NULL && svc->mt_ctx->started_services > 0) {
442 svc->mt_ctx->started_services--;
521 struct mt_ctx *ctx = svc->mt_ctx;
622 struct mt_ctx *ctx = talloc_get_type(ptr, struct mt_ctx);
646 static int add_services_startup_timeout(struct mt_ctx *ctx)
670 static int monitor_dbus_init(struct mt_ctx *ctx)
728 struct mt_ctx *mt_ctx;
730 mt_ctx = file_ctx->mt_ctx;
740 for (cur_svc = mt_ctx->svc_list; cur_svc; cur_svc = cur_svc->next) {
778 svc->mt_ctx->service_id_timeout,
974 static int get_service_user(struct mt_ctx *ctx)
997 static int get_monitor_config(struct mt_ctx *ctx)
1113 static int get_service_config(struct mt_ctx *ctx, const char *name,
1129 svc->mt_ctx = ctx;
1230 static int add_new_service(struct mt_ctx *ctx,
1252 static int get_provider_config(struct mt_ctx *ctx, const char *name,
1266 svc->mt_ctx = ctx;
1380 static int add_new_provider(struct mt_ctx *ctx,
1422 struct mt_ctx *ctx = talloc_get_type(private_data, struct mt_ctx);
1460 static void monitor_quit(struct mt_ctx *mt_ctx, int ret)
1472 DLIST_FOR_EACH(svc, mt_ctx->svc_list) {
1568 struct mt_ctx *mt_ctx = talloc_get_type(private_data, struct mt_ctx);
1575 monitor_quit(mt_ctx, 0);
1578 static void signal_res_init(struct mt_ctx *monitor)
1599 struct mt_ctx *monitor;
1602 monitor = talloc_get_type(private_data, struct mt_ctx);
1623 struct mt_ctx *monitor;
1626 monitor = talloc_get_type(private_data, struct mt_ctx);
1645 struct mt_ctx *mon = talloc_get_type(mem, struct mt_ctx);
1652 svc->mt_ctx = NULL;
1668 struct mt_ctx **monitor)
1671 struct mt_ctx *ctx;
1674 ctx = talloc_zero(mem_ctx, struct mt_ctx);
1741 file_ctx->poll_check.timer = tevent_add_timer(file_ctx->mt_ctx->ev,
1824 snctx = snotify_create(file_ctx, file_ctx->mt_ctx->ev, SNOTIFY_WATCH_DIR,
1840 struct mt_ctx *ctx,
1851 ctx->file_ctx->mt_ctx = ctx;
1940 struct mt_ctx *ctx = talloc_get_type(data, struct mt_ctx);
1958 static int monitor_process_init(struct mt_ctx *ctx,
2166 struct mt_ctx *ctx;
2172 ctx = talloc_get_type(data, struct mt_ctx);
2207 struct mt_ctx *ctx;
2210 ctx = talloc_get_type(data, struct mt_ctx);
2256 te = tevent_add_timer(svc->mt_ctx->ev, svc, tv,
2290 mt_svc->mt_ctx->check_children = true;
2294 mt_svc->mt_ctx->sigchld_ctx,
2307 DLIST_ADD(mt_svc->mt_ctx->svc_list, mt_svc);
2343 add_new_service(svc->mt_ctx, svc->name, svc->restarts + 1);
2345 add_new_provider(svc->mt_ctx, svc->name, svc->restarts + 1);
2374 struct mt_ctx *mt_ctx = svc->mt_ctx;
2404 monitor_quit(mt_ctx, 1);
2415 te = tevent_add_timer(svc->mt_ctx->ev, svc, tv, mt_svc_restart, svc);
2440 struct mt_ctx *monitor;