예제 #1
0
파일: yp.c 프로젝트: cmelendez/icecast-kh
static void yp_process_server (struct yp_server *server)
{
    ypdata_t *yp;
    int state = 0;

    /* DEBUG1("processing yp server %s", server->url); */
    yp = server->mounts;
    while (yp)
    {
        now = time(NULL);
        /* if one of the streams shows that the server cannot be contacted then mark the
         * other entries for an update later. Assume YP server is dead and skip it for now
         */
        if (state == -2)
        {
            DEBUG2 ("skiping %s on %s", yp->mount, server->url);
            yp->process = do_yp_add;
            yp_schedule (yp, 900);
        }
        else
            state = process_ypdata (server, yp);
        if (yp->remove == 0 && (uint64_t)yp->next_update < ypclient.counter)
            ypclient.counter = (uint64_t)yp->next_update;

        yp = yp->next;
    }
}
예제 #2
0
static void yp_process_server (struct yp_server *server)
{
    ypdata_t *yp;

    /* DEBUG1("processing yp server %s", server->url); */
    yp = server->mounts;
    while (yp)
    {
        now = time (NULL);
        process_ypdata (server, yp);
        yp = yp->next;
    }
}