Index: res/res_features.c =================================================================== RCS file: /usr/cvsroot/asterisk/res/res_features.c,v retrieving revision 1.16.2.2 diff -u -r1.16.2.2 res_features.c --- res/res_features.c 20 Dec 2004 00:27:19 -0000 1.16.2.2 +++ res/res_features.c 26 Jan 2005 17:20:20 -0000 @@ -224,12 +224,6 @@ if (adsipark && adsi_available(peer)) { adsi_unload_session(peer); } - if (pu->notquiteyet) { - /* Wake up parking thread if we're really done */ - ast_moh_start(pu->chan, NULL); - pu->notquiteyet = 0; - pthread_kill(parking_thread, SIGURG); - } } con = ast_context_find(parking_con); if (!con) { @@ -242,6 +236,13 @@ snprintf(exten, sizeof(exten), "%d", x); ast_add_extension2(con, 1, exten, 1, NULL, parkedcall, strdup(exten), free, registrar); } + if (pu->notquiteyet) { + /* Wake up parking thread if we're really done */ + ast_moh_start(pu->chan, NULL); + pu->notquiteyet = 0; + pthread_kill(parking_thread, SIGURG); + } + return 0; } else { ast_log(LOG_WARNING, "No more parking spaces\n"); @@ -551,7 +552,6 @@ char exten[AST_MAX_EXTENSION]; struct ast_context *con; int x; - int gc=0; fd_set rfds, efds; fd_set nrfds, nefds; FD_ZERO(&rfds); @@ -571,10 +571,6 @@ pl = pu; pu = pu->next; continue; - } - if (gc < 5 && !pu->chan->generator) { - gc++; - ast_moh_start(pu->chan,NULL); } tms = (tv.tv_sec - pu->start.tv_sec) * 1000 + (tv.tv_usec - pu->start.tv_usec) / 1000; if (tms > pu->parkingtime) {