[svn-commits] branch jcollie/bug7131 r30423 - in
/team/jcollie/bug7131: ./ apps/
svn-commits at lists.digium.com
svn-commits at lists.digium.com
Thu May 25 14:19:24 MST 2006
Author: file
Date: Thu May 25 16:19:23 2006
New Revision: 30423
URL: http://svn.digium.com/view/asterisk?rev=30423&view=rev
Log:
Merged revisions 30409,30411 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r30409 | file | 2006-05-25 18:06:08 -0300 (Thu, 25 May 2006) | 2 lines
Remove possibility of sending duplicate MeetmeJoin manager events, and only send a MeetmeLeave event if a MeetmeJoin event occured in the first place. (issue #6599 reported by imran - provided patch with few tiny mods)
........
r30411 | tilghman | 2006-05-25 18:06:43 -0300 (Thu, 25 May 2006) | 2 lines
Deprecate SetCallerID (should have happened prior to release of 1.2)
........
Modified:
team/jcollie/bug7131/ (props changed)
team/jcollie/bug7131/apps/app_meetme.c
team/jcollie/bug7131/apps/app_setcallerid.c
Propchange: team/jcollie/bug7131/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu May 25 16:19:23 2006
@@ -1,1 +1,1 @@
-/trunk:1-30390
+/trunk:1-30422
Modified: team/jcollie/bug7131/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/jcollie/bug7131/apps/app_meetme.c?rev=30423&r1=30422&r2=30423&view=diff
==============================================================================
--- team/jcollie/bug7131/apps/app_meetme.c (original)
+++ team/jcollie/bug7131/apps/app_meetme.c Thu May 25 16:19:23 2006
@@ -883,6 +883,7 @@
int using_pseudo = 0;
int duration=20;
int hr, min, sec;
+ int sent_event = 0;
time_t now;
struct ast_dsp *dsp=NULL;
struct ast_app *app;
@@ -1135,12 +1136,15 @@
}
ast_log(LOG_DEBUG, "Placed channel %s in ZAP conf %d\n", chan->name, conf->zapconf);
- manager_event(EVENT_FLAG_CALL, "MeetmeJoin",
- "Channel: %s\r\n"
- "Uniqueid: %s\r\n"
- "Meetme: %s\r\n"
- "Usernum: %d\r\n",
- chan->name, chan->uniqueid, conf->confno, user->user_no);
+ if (!sent_event) {
+ manager_event(EVENT_FLAG_CALL, "MeetmeJoin",
+ "Channel: %s\r\n"
+ "Uniqueid: %s\r\n"
+ "Meetme: %s\r\n"
+ "Usernum: %d\r\n",
+ chan->name, chan->uniqueid, conf->confno, user->user_no);
+ sent_event = 1;
+ }
if (!firstpass && !(confflags & CONFFLAG_MONITOR) && !(confflags & CONFFLAG_ADMIN)) {
firstpass = 1;
@@ -1693,19 +1697,21 @@
min = ((now - user->jointime) % 3600) / 60;
sec = (now - user->jointime) % 60;
- manager_event(EVENT_FLAG_CALL, "MeetmeLeave",
- "Channel: %s\r\n"
- "Uniqueid: %s\r\n"
- "Meetme: %s\r\n"
- "Usernum: %d\r\n"
- "CallerIDnum: %s\r\n"
- "CallerIDname: %s\r\n"
- "Duration: %ld\r\n",
- chan->name, chan->uniqueid, conf->confno,
- user->user_no,
- S_OR(user->chan->cid.cid_num, "<unknown>"),
- S_OR(user->chan->cid.cid_name, "<unknown>"),
- (now - user->jointime));
+ if (sent_event) {
+ manager_event(EVENT_FLAG_CALL, "MeetmeLeave",
+ "Channel: %s\r\n"
+ "Uniqueid: %s\r\n"
+ "Meetme: %s\r\n"
+ "Usernum: %d\r\n"
+ "CallerIDnum: %s\r\n"
+ "CallerIDname: %s\r\n"
+ "Duration: %ld\r\n",
+ chan->name, chan->uniqueid, conf->confno,
+ user->user_no,
+ S_OR(user->chan->cid.cid_num, "<unknown>"),
+ S_OR(user->chan->cid.cid_name, "<unknown>"),
+ (now - user->jointime));
+ }
conf->users--;
conf->refcount--;
Modified: team/jcollie/bug7131/apps/app_setcallerid.c
URL: http://svn.digium.com/view/asterisk/team/jcollie/bug7131/apps/app_setcallerid.c?rev=30423&r1=30422&r2=30423&view=diff
==============================================================================
--- team/jcollie/bug7131/apps/app_setcallerid.c (original)
+++ team/jcollie/bug7131/apps/app_setcallerid.c Thu May 25 16:19:23 2006
@@ -107,6 +107,7 @@
struct localuser *u;
char *opt;
int anitoo = 0;
+ static int dep_warning = 0;
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "SetCallerID requires an argument!\n");
@@ -114,7 +115,12 @@
}
LOCAL_USER_ADD(u);
-
+
+ if (!dep_warning) {
+ dep_warning = 1;
+ ast_log(LOG_WARNING, "SetCallerID is deprecated. Please use Set(CALLERID(all)=...) or Set(CALLERID(ani)=...) instead.\n");
+ }
+
tmp = ast_strdupa(data);
opt = strchr(tmp, '|');
More information about the svn-commits
mailing list