struct timeval current_time;
#ifdef WITH_MISDN
struct mISDNport *mISDNport;
- int avail,
- any;
+ int avail;
int jj;
class Port *port;
class Pfxs *ourfxs, *fxs;
case MATCH_BUSY:
case MATCH_IDLE:
#ifdef WITH_MISDN
- any = 0;
mISDNport = mISDNport_first;
while(mISDNport) {
if (mISDNport->ifport)
/* we must have greater or equal length to values */
if ((unsigned long)strlen(string) < comp_len) {
/* special case for unfinished dialing */
- if (cond->match == MATCH_DIALING) {
+ if (cond->match == MATCH_DIALING && !e_dialinginfo.sending_complete) {
couldbetrue = 1; /* could match */
comp_len = strlen(string);
} else {
cond = cond->next;
}
- if (timeout>now_ll && match==1) { /* the matching rule with timeout in the future */
+ /* if sending complete, we use future match now, since waiting does not make sense anymore */
+ if (timeout>now_ll && match==1 && !e_dialinginfo.sending_complete) { /* the matching rule with timeout in the future */
if (match_timeout == 0 || timeout < match_timeout) { /* first timeout or lower */
/* set timeout in the furture */
match_timeout = timeout;