Code: Alles auswählen
if (update_pmt) {
while (zapit_server.run(parse_command, CZapitMessages::ACTVERSION, true)) {
unsigned int i, pollnum = 0;
struct pollfd pfd[1];
if (pmt_update_fd != -1) {
pfd[pollnum].fd = pmt_update_fd;
pfd[pollnum].events = (POLLIN | POLLPRI);
pollnum++;
}
if (pollnum) {
if (poll(pfd, pollnum, 0) > 0) {
for (i = 0; i < pollnum; i++) {
if (pfd[i].fd == pmt_update_fd) {
zapit(channel->getChannelID(), current_is_nvod, 0);
}
}
}
}
/* yuck, don't waste that much cpu time :) */
usleep(0);
}
}
else {
zapit_server.run(parse_command, CZapitMessages::ACTVERSION);
}
da wird ja immer um 1 erhöht, aber das array struct pollfd pfd[1] hat
nur 1 element. eigentlich müsste pollnum aber immer 0 sein, weil sonst
ein speicherfehler die folge wäre.
kopfkratz,
wahnfried