projects
/
lcr.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6e5729b
)
Added additional debug logging to lcr_read.
author
Andreas Eversberg
<jolly@eversberg.eu>
Wed, 9 Jun 2010 07:58:34 +0000
(09:58 +0200)
committer
Andreas Eversberg
<jolly@eversberg.eu>
Wed, 9 Jun 2010 07:58:34 +0000
(09:58 +0200)
chan_lcr.c
patch
|
blob
|
history
diff --git
a/chan_lcr.c
b/chan_lcr.c
index
09083c0
..
c912b80
100644
(file)
--- a/
chan_lcr.c
+++ b/
chan_lcr.c
@@
-227,7
+227,7
@@
void lock_debug(char *text)
{
pthread_t tid = pthread_self();
// printf("%s|%03x\n", text, ((tid>>6) | (tid>>3) | tid) & 0xfff); fflush(stdout);
{
pthread_t tid = pthread_self();
// printf("%s|%03x\n", text, ((tid>>6) | (tid>>3) | tid) & 0xfff); fflush(stdout);
- printf("%s|%x", text, tid); fflush(stdout);
+ printf("%s|%x", text,
(int)
tid); fflush(stdout);
}
/*
}
/*
@@
-2238,13
+2238,16
@@
static struct ast_frame *lcr_read(struct ast_channel *ast)
if (call->pipe[0] > -1) {
if (call->rebuffer && !call->hdlc) {
/* Make sure we have a complete 20ms (160byte) frame */
if (call->pipe[0] > -1) {
if (call->rebuffer && !call->hdlc) {
/* Make sure we have a complete 20ms (160byte) frame */
+ lock_debug("*1");
len=read(call->pipe[0],call->read_buff + call->framepos, 160 - call->framepos);
if (len > 0) {
call->framepos += len;
}
} else {
len=read(call->pipe[0],call->read_buff + call->framepos, 160 - call->framepos);
if (len > 0) {
call->framepos += len;
}
} else {
+ lock_debug("*2");
len = read(call->pipe[0], call->read_buff, sizeof(call->read_buff));
}
len = read(call->pipe[0], call->read_buff, sizeof(call->read_buff));
}
+ lock_debug("*3");
if (len < 0 && errno == EAGAIN) {
ast_mutex_unlock(&chan_lock);
lock_debug("a9");
if (len < 0 && errno == EAGAIN) {
ast_mutex_unlock(&chan_lock);
lock_debug("a9");