int readRights(int fd, long count, size_t count_len, int **fds, int msi_vectors)
{
    int j, newfd;

    for (; ;){
        long posn = 0;

        readUpdate(fd, &posn, &newfd);
        printf("reading posn %ld ", posn);
        fds[posn] = (int *)malloc (msi_vectors * sizeof(int));
        fds[posn][0] = newfd;
        for (j = 1; j < msi_vectors; j++) {
            readUpdate(fd, &posn, &newfd);
            fds[posn][j] = newfd;
            printf("%d.", fds[posn][j]);
        }
        printf("\n");

        /* stop reading once i've read my own eventfds */
        if (posn == count)
            break;
    }

    return 0;
}
Exemple #2
0
void UpdateWindow::workFinished()
{
    mCancelButton->setEnabled(false);

    switch (mCurrentWork)
    {
    case WT_UPDATELIST:
        resolveUpdate();
        break;

    case WT_GETUPDATE:
        downloadCheckSum();
        break;

    case WT_GETCHECKSUM:
        readUpdate();
        break;

    default:
        break;
    }

}