adaptor 433 lib/common/mainloop.c struct gio_to_qb_poll *adaptor = (struct gio_to_qb_poll *)data; adaptor 440 lib/common/mainloop.c CRM_ASSERT(adaptor->is_used > 0); adaptor 442 lib/common/mainloop.c return (adaptor->fn(fd, condition, adaptor->data) == 0); adaptor 448 lib/common/mainloop.c struct gio_to_qb_poll *adaptor = (struct gio_to_qb_poll *)data; adaptor 450 lib/common/mainloop.c adaptor->is_used--; adaptor 451 lib/common/mainloop.c CRM_ASSERT(adaptor->is_used >= 0); adaptor 453 lib/common/mainloop.c if (adaptor->is_used == 0) { adaptor 454 lib/common/mainloop.c crm_trace("Marking adaptor %p unused", adaptor); adaptor 455 lib/common/mainloop.c adaptor->source = 0; adaptor 463 lib/common/mainloop.c struct gio_to_qb_poll *adaptor; adaptor 467 lib/common/mainloop.c res = qb_array_index(gio_map, fd, (void **)&adaptor); adaptor 473 lib/common/mainloop.c crm_trace("Adding fd=%d to mainloop as adaptor %p", fd, adaptor); adaptor 475 lib/common/mainloop.c if (add && adaptor->source) { adaptor 479 lib/common/mainloop.c if (!add && !adaptor->is_used) { adaptor 491 lib/common/mainloop.c if (adaptor->source) { adaptor 492 lib/common/mainloop.c g_source_remove(adaptor->source); adaptor 493 lib/common/mainloop.c adaptor->source = 0; adaptor 499 lib/common/mainloop.c adaptor->fn = fn; adaptor 500 lib/common/mainloop.c adaptor->events = evts; adaptor 501 lib/common/mainloop.c adaptor->data = data; adaptor 502 lib/common/mainloop.c adaptor->p = p; adaptor 503 lib/common/mainloop.c adaptor->is_used++; adaptor 504 lib/common/mainloop.c adaptor->source = adaptor 505 lib/common/mainloop.c g_io_add_watch_full(channel, G_PRIORITY_DEFAULT, evts, gio_read_socket, adaptor, adaptor 519 lib/common/mainloop.c crm_trace("Added to mainloop with gsource id=%d", adaptor->source); adaptor 520 lib/common/mainloop.c if (adaptor->source > 0) { adaptor 544 lib/common/mainloop.c struct gio_to_qb_poll *adaptor; adaptor 547 lib/common/mainloop.c if (qb_array_index(gio_map, fd, (void **)&adaptor) == 0) { adaptor 548 lib/common/mainloop.c if (adaptor->source) { adaptor 549 lib/common/mainloop.c g_source_remove(adaptor->source); adaptor 550 lib/common/mainloop.c adaptor->source = 0;