in lcr_read
(lcr_read was hanging in locked-state forever, when no data was
available, making any further calls impossible.
Now we return a null-packet to asterisk)
Sidenode: you have to use lcr_config(r) to receive faxes correctly.
(app_rxfax seems to rely on 160-byte buffers)
free_call(*callp);
return(NULL);
}
+ fcntl((*callp)->pipe[0], F_SETFL, O_NONBLOCK);
CDEBUG(*callp, NULL, "Call instance allocated.\n");
return(*callp);
}
} else {
len = read(call->pipe[0], call->read_buff, sizeof(call->read_buff));
}
+ if (len < 0 && errno == EAGAIN) {
+ ast_mutex_unlock(&chan_lock);
+ return &ast_null_frame;
+ }
if (len <= 0) {
close(call->pipe[0]);
call->pipe[0] = -1;
+ ast_mutex_unlock(&chan_lock);
return NULL;
}
}