- fix deadlock when changing to fax mode

This commit is contained in:
MelwareDE 2006-01-29 12:01:08 +00:00
parent bd1f4faaba
commit b18c166ecf
1 changed files with 2 additions and 2 deletions

View File

@ -1843,8 +1843,10 @@ static int capi_receive_fax(struct ast_channel *c, char *data)
case CAPI_STATE_DID:
case CAPI_STATE_INCALL:
capi_send_answer(c, bprot, (_cstruct)&b3conf);
cc_mutex_unlock(&i->lock);
break;
case CAPI_STATE_CONNECTED:
cc_mutex_unlock(&i->lock);
capi_change_bchan_fax(c, &b3conf);
break;
default:
@ -1855,8 +1857,6 @@ static int capi_receive_fax(struct ast_channel *c, char *data)
return -1;
}
cc_mutex_unlock(&i->lock);
while (i->FaxState == 1) {
usleep(10000);
}