Logo Search packages:      
Sourcecode: avahi version File versions  Download package

int avahi_simple_poll_run ( AvahiSimplePoll s  ) 

The second stage of avahi_simple_poll_iterate(), use this function only if you know what you do

Definition at line 518 of file simple-watch.c.

                                              {
    assert(s);
    assert(s->state == STATE_PREPARED || s->state == STATE_FAILURE);

    s->state = STATE_RUNNING;

    for (;;) {
        errno = 0;

        if (s->poll_func(s->pollfds, s->n_pollfds, s->prepared_timeout, s->poll_func_userdata) < 0) {

            if (errno == EINTR)
                continue;

            s->state = STATE_FAILURE;
            return -1;
        }

        break;
    }

    /* The poll events are now valid again */
    s->events_valid = 1;

    /* Update state */
    s->state = STATE_RAN;
    return 0;
}


Generated by  Doxygen 1.6.0   Back to index