adaptor 428 lib/common/mainloop.c struct gio_to_qb_poll *adaptor = (struct gio_to_qb_poll *)data; adaptor 435 lib/common/mainloop.c CRM_ASSERT(adaptor->is_used > 0); adaptor 437 lib/common/mainloop.c return (adaptor->fn(fd, condition, adaptor->data) == 0); adaptor 443 lib/common/mainloop.c struct gio_to_qb_poll *adaptor = (struct gio_to_qb_poll *)data; adaptor 445 lib/common/mainloop.c adaptor->is_used--; adaptor 446 lib/common/mainloop.c CRM_ASSERT(adaptor->is_used >= 0); adaptor 448 lib/common/mainloop.c if (adaptor->is_used == 0) { adaptor 449 lib/common/mainloop.c crm_trace("Marking adaptor %p unused", adaptor); adaptor 450 lib/common/mainloop.c adaptor->source = 0; adaptor 517 lib/common/mainloop.c struct gio_to_qb_poll *adaptor; adaptor 521 lib/common/mainloop.c res = qb_array_index(gio_map, fd, (void **)&adaptor); adaptor 527 lib/common/mainloop.c crm_trace("Adding fd=%d to mainloop as adaptor %p", fd, adaptor); adaptor 529 lib/common/mainloop.c if (add && adaptor->source) { adaptor 533 lib/common/mainloop.c if (!add && !adaptor->is_used) { adaptor 545 lib/common/mainloop.c if (adaptor->source) { adaptor 546 lib/common/mainloop.c g_source_remove(adaptor->source); adaptor 547 lib/common/mainloop.c adaptor->source = 0; adaptor 553 lib/common/mainloop.c adaptor->fn = fn; adaptor 554 lib/common/mainloop.c adaptor->events = evts; adaptor 555 lib/common/mainloop.c adaptor->data = data; adaptor 556 lib/common/mainloop.c adaptor->p = p; adaptor 557 lib/common/mainloop.c adaptor->is_used++; adaptor 558 lib/common/mainloop.c adaptor->source = adaptor 560 lib/common/mainloop.c gio_read_socket, adaptor, gio_poll_destroy); adaptor 573 lib/common/mainloop.c crm_trace("Added to mainloop with gsource id=%d", adaptor->source); adaptor 574 lib/common/mainloop.c if (adaptor->source > 0) { adaptor 598 lib/common/mainloop.c struct gio_to_qb_poll *adaptor; adaptor 601 lib/common/mainloop.c if (qb_array_index(gio_map, fd, (void **)&adaptor) == 0) { adaptor 602 lib/common/mainloop.c if (adaptor->source) { adaptor 603 lib/common/mainloop.c g_source_remove(adaptor->source); adaptor 604 lib/common/mainloop.c adaptor->source = 0;