Index: apps/app_voicemail.c =================================================================== --- apps/app_voicemail.c (revision 94543) +++ apps/app_voicemail.c (working copy) @@ -167,7 +167,6 @@ #define MAXMSGLIMIT 255 #endif -#define BASEMAXINLINE 256 #define BASELINELEN 72 #define BASEMAXINLINE 256 #define eol "\r\n" @@ -1625,7 +1624,10 @@ static int base_encode(char *filename, FILE *so) { - unsigned char dtable[BASEMAXINLINE]; + static const unsigned char dtable[] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', + 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', + 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', + '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/'}; int i,hiteof= 0; FILE *fi; struct baseio bio; @@ -1638,22 +1640,6 @@ return -1; } - for (i= 0;i<9;i++) { - dtable[i]= 'A'+i; - dtable[i+9]= 'J'+i; - dtable[26+i]= 'a'+i; - dtable[26+i+9]= 'j'+i; - } - for (i= 0;i<8;i++) { - dtable[i+18]= 'S'+i; - dtable[26+i+18]= 's'+i; - } - for (i= 0;i<10;i++) { - dtable[52+i]= '0'+i; - } - dtable[62]= '+'; - dtable[63]= '/'; - while (!hiteof){ unsigned char igroup[3],ogroup[4]; int c,n; Index: apps/app_queue.c =================================================================== --- apps/app_queue.c (revision 94464) +++ apps/app_queue.c (working copy) @@ -287,6 +287,7 @@ struct callattempt { struct callattempt *q_next; + struct callattempt *call_next; struct ast_channel *chan; char interface[256]; int stillgoing; @@ -2042,7 +2043,7 @@ static struct callattempt *wait_for_answer(struct queue_ent *qe, struct callattempt *outgoing, int *to, char *digit, int prebusies, int caller_disconnect, int forwardsallowed) { char *queue = qe->parent->name; - struct callattempt *o; + struct callattempt *o, *start = NULL, *prev = NULL; int status; int numbusies = prebusies; int numnochan = 0; @@ -2063,14 +2064,21 @@ int numlines, retry, pos = 1; struct ast_channel *watchers[AST_MAX_WATCHERS]; watchers[0] = in; + start = NULL; for (retry = 0; retry < 2; retry++) { numlines = 0; for (o = outgoing; o; o = o->q_next) { /* Keep track of important channels */ if (o->stillgoing) { /* Keep track of important channels */ stillgoing = 1; - if (o->chan) + if (o->chan) { watchers[pos++] = o->chan; + if (!start) + start = o; + else + prev->call_next = o; + prev = o; + } } numlines++; } @@ -2092,7 +2100,7 @@ return NULL; } winner = ast_waitfor_n(watchers, pos, to); - for (o = outgoing; o; o = o->q_next) { + for (o = start; o; o = o->call_next) { if (o->stillgoing && (o->chan) && (o->chan->_state == AST_STATE_UP)) { if (!peer) { if (option_verbose > 2) @@ -2262,8 +2270,10 @@ } ast_frfree(f); } - if (!*to) - rna(orig, qe, on, membername); + if (!*to) { + for (o = start; o; o = o->call_next) + rna(orig, qe, o->interface, o->member->membername); + } } return peer;