{
pthread_t tid = pthread_self();
// printf("%s|%03x\n", text, ((tid>>6) | (tid>>3) | tid) & 0xfff); fflush(stdout);
- printf("%s|%x", text, (int)tid); fflush(stdout);
+ printf(" %s(%x) ", text, (int)tid); fflush(stdout);
}
/*
char ast_text[128] = "NULL";
va_list args;
- lock_debug("L");
+ lock_debug("L+");
ast_mutex_lock(&log_lock);
+ lock_debug("L-");
va_start(args,fmt);
vsnprintf(buffer,sizeof(buffer)-1,fmt,args);
p = call->queue_string;
ast = call->ast;
if (*p && ast) {
- lock_debug("A1");
+ lock_debug("A1+");
ast_channel_lock(ast);
+ lock_debug("A1-");
while(*p) {
switch (*p) {
case 'T':
void lock_chan(void)
{
- lock_debug("C");
+ lock_debug("C+");
ast_mutex_lock(&chan_lock);
+ lock_debug("C-");
}
void unlock_chan(void)
/* open socket the first time */
handle_retry(NULL, NULL, 0);
- lock_debug("A2");
+ lock_debug("A2+");
ast_mutex_lock(&chan_lock);
+ lock_debug("A2-");
while(!quit) {
handle_queue();
struct ast_channel *ast;
struct chan_call *call;
- lock_debug("A3");
+ lock_debug("A3+");
ast_mutex_lock(&chan_lock);
+ lock_debug("A3-");
CDEBUG(NULL, NULL, "Received request from Asterisk. (data=%s)\n", (char *)data);
/* if socket is closed */
union parameter newparam;
struct chan_call *call;
- lock_debug("A4");
+ lock_debug("A4+");
ast_mutex_lock(&chan_lock);
+ lock_debug("A4-");
call = ast->tech_pvt;
#ifdef LCR_FOR_CALLWEAVER
if (digit > 126 || digit < 32)
return 0;
- lock_debug("A5");
+ lock_debug("A5+");
ast_mutex_lock(&chan_lock);
+ lock_debug("A5-");
call = ast->tech_pvt;
if (!call) {
CERROR(NULL, ast, "Received digit from Asterisk, but no call instance exists.\n");
struct chan_call *call;
#endif
- lock_debug("A6");
+ lock_debug("A6+");
ast_mutex_lock(&chan_lock);
+ lock_debug("A6-");
call = ast->tech_pvt;
union parameter newparam;
struct chan_call *call;
- lock_debug("A7");
+ lock_debug("A7+");
ast_mutex_lock(&chan_lock);
+ lock_debug("A7-");
call = ast->tech_pvt;
if (!call) {
CERROR(NULL, ast, "Received answer from Asterisk, but no call instance exists.\n");
pthread_t tid = pthread_self();
if (!pthread_equal(tid, chan_tid)) {
- lock_debug("H");
+ lock_debug("H+");
ast_mutex_lock(&chan_lock);
+ lock_debug("H-");
}
call = ast->tech_pvt;
if (!call) {
if (!(f->subclass & ast->nativeformats))
CDEBUG(NULL, ast, "Unexpected format.\n");
- lock_debug("A8");
+ lock_debug("A8+");
ast_mutex_lock(&chan_lock);
+ lock_debug("A8-");
call = ast->tech_pvt;
if (!call) {
ast_mutex_unlock(&chan_lock);
struct chan_call *call;
int len;
- lock_debug("A9");
+ lock_debug("A9+");
ast_mutex_lock(&chan_lock);
+ lock_debug("A9-");
call = ast->tech_pvt;
if (!call) {
ast_mutex_unlock(&chan_lock);
struct chan_call *call;
const struct tone_zone_sound *ts = NULL;
- lock_debug("A0");
+ lock_debug("A0+");
ast_mutex_lock(&chan_lock);
+ lock_debug("A0-");
call = ast->tech_pvt;
if (!call) {
CERROR(NULL, ast, "Received indicate from Asterisk, but no call instance exists.\n");
return -1;
}
- lock_debug("Af");
+ lock_debug("Af+");
ast_mutex_lock(&chan_lock);
+ lock_debug("Af-");
call = ast->tech_pvt;
if (!call) {
CERROR(NULL, ast, "Received fixup from Asterisk, but no call instance exists.\n");
struct chan_call *call;
union parameter newparam;
- lock_debug("At");
+ lock_debug("At+");
ast_mutex_lock(&chan_lock);
+ lock_debug("At-");
call = ast->tech_pvt;
if (!call) {
CERROR(NULL, ast, "Received send_text from Asterisk, but no call instance exists.\n");
carr[1] = ast2;
/* join via dsp (if the channels are currently open) */
- lock_debug("Ab");
+ lock_debug("Ab+");
ast_mutex_lock(&chan_lock);
+ lock_debug("Ab-");
call1 = ast1->tech_pvt;
call2 = ast2->tech_pvt;
if (!call1 || !call2) {
CDEBUG(NULL, NULL, "Releasing bridge.\n");
/* split channels */
- lock_debug("Ab");
+ lock_debug("Ab+");
ast_mutex_lock(&chan_lock);
+ lock_debug("Ab-");
call1 = ast1->tech_pvt;
call2 = ast2->tech_pvt;
if (call1 && call1->bridge_id) {
{
struct chan_call *call;
- lock_debug("Ae");
+ lock_debug("Ae+");
ast_mutex_lock(&chan_lock);
+ lock_debug("Ae-");
#ifdef LCR_FOR_ASTERISK
CDEBUG(NULL, ast, "Received lcr_config (data=%s)\n", (char *)data);
hae
{
int res;
- lock_debug("U");
+ lock_debug("U+");
ast_mutex_lock(&usecnt_lock);
+ lock_debug("U-");
res = usecnt;
ast_mutex_unlock(&usecnt_lock);
lock_debug("u");