[Asterisk-cvs] asterisk/res res_features.c,1.37,1.38
markster at lists.digium.com
markster at lists.digium.com
Wed Jan 26 00:17:01 CST 2005
Update of /usr/cvsroot/asterisk/res
In directory mongoose.digium.com:/tmp/cvs-serv1502/res
Modified Files:
res_features.c
Log Message:
Fix parking issue (bug #3396)
Index: res_features.c
===================================================================
RCS file: /usr/cvsroot/asterisk/res/res_features.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- res_features.c 25 Jan 2005 06:10:20 -0000 1.37
+++ res_features.c 26 Jan 2005 06:19:13 -0000 1.38
@@ -241,8 +241,7 @@
pu->parkingtime = parkingtime;
if (extout)
*extout = x;
- if (peer)
- {
+ if (peer) {
strncpy(pu->peername,peer->name,sizeof(pu->peername) - 1);
}
/* Remember what had been dialed, so that if the parking
@@ -290,12 +289,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) {
@@ -309,6 +302,12 @@
ast_add_extension2(con, 1, exten, 1, NULL, NULL, parkedcall, strdup(exten), free, registrar);
}
if (peer) ast_say_digits(peer, pu->parkingnum, "", peer->language);
+ 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");
@@ -1085,7 +1084,6 @@
char *peername,*cp;
struct ast_context *con;
int x;
- int gc=0;
fd_set rfds, efds;
fd_set nrfds, nefds;
FD_ZERO(&rfds);
@@ -1106,10 +1104,6 @@
pu = pu->next;
continue;
}
- if (gc < 5 && !pu->chan->generator) {
- gc++;
- ast_moh_start(pu->chan,NULL);
- }
gettimeofday(&tv, NULL);
tms = (tv.tv_sec - pu->start.tv_sec) * 1000 + (tv.tv_usec - pu->start.tv_usec) / 1000;
if (tms > pu->parkingtime) {
More information about the svn-commits
mailing list