Index: configs/zapata.conf.sample =================================================================== --- configs/zapata.conf.sample (revision 88827) +++ configs/zapata.conf.sample (working copy) @@ -154,7 +154,7 @@ ; T305: Wait for DISCONNECT acknowledge (default 30000 ms) ; T308: Wait for RELEASE acknowledge (default 4000 ms) ; T309: Maintain active calls on Layer 2 disconnection (default -1, - Asterisk clears calls) +; Asterisk clears calls) ; EuroISDN: 6000 to 12000 ms, according to (N200 + 1) x T200 + 2s ; May vary in other ISDN standards (Q.931 1993 : 90000 ms) ; T313: Wait for CONNECT acknowledge, CPE side only (default 3000 ms) Index: channels/chan_zap.c =================================================================== --- channels/chan_zap.c (revision 88827) +++ channels/chan_zap.c (working copy) @@ -1073,7 +1073,13 @@ } } bs = READ_SIZE; - if (ioctl(fd, ZT_SET_BLOCKSIZE, &bs) == -1) return -1; + if (ioctl(fd, ZT_SET_BLOCKSIZE, &bs) == -1) { + ast_log(LOG_WARNING, "Unable to set blocksize '%d': %s\n", bs, strerror(errno)); + x = errno; + close(fd); + errno = x; + return -1; + } return fd; } @@ -13216,8 +13222,10 @@ continue; } /* if got exception */ - if (fds[0].revents & POLLPRI) + if (fds[0].revents & POLLPRI) { + ast_free(mybuf); return -1; + } if (!(fds[0].revents & POLLOUT)) { ast_debug(1, "write fd not ready on channel %d\n", p->channel); continue;