freetdm: do not write to io dump if is not enabled

This commit is contained in:
Moises Silva 2010-12-03 14:13:43 -05:00
parent 1e3a86310f
commit b156f4d03f
1 changed files with 4 additions and 0 deletions

View File

@ -91,6 +91,10 @@ static void write_chan_io_dump(ftdm_channel_t *fchan, ftdm_io_dump_t *dump, char
int windex = dump->windex;
int avail = dump->size - windex;
if (!dump->buffer) {
return;
}
if (dlen > avail) {
int diff = dlen - avail;