[asterisk-commits] oej: branch oej/teapot-1.8 r385959 - in /team/oej/teapot-1.8: ./ apps/ build_...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Apr 17 04:17:48 CDT 2013
Author: oej
Date: Wed Apr 17 04:17:40 2013
New Revision: 385959
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=385959
Log:
Updating my brew. Nothing beats a nice pot of tea.
Modified:
team/oej/teapot-1.8/ (props changed)
team/oej/teapot-1.8/BSDmakefile (props changed)
team/oej/teapot-1.8/Makefile
team/oej/teapot-1.8/UPGRADE.txt
team/oej/teapot-1.8/apps/app_queue.c
team/oej/teapot-1.8/apps/app_saycounted.c (props changed)
team/oej/teapot-1.8/apps/app_voicemail.c
team/oej/teapot-1.8/build_tools/sha1sum-sh (props changed)
team/oej/teapot-1.8/channels/chan_alsa.c
team/oej/teapot-1.8/channels/chan_iax2.c
team/oej/teapot-1.8/channels/chan_multicast_rtp.c (props changed)
team/oej/teapot-1.8/channels/chan_sip.c
team/oej/teapot-1.8/channels/sig_ss7.c (props changed)
team/oej/teapot-1.8/channels/sig_ss7.h (props changed)
team/oej/teapot-1.8/configs/extconfig.conf.sample
team/oej/teapot-1.8/configs/res_curl.conf.sample (props changed)
team/oej/teapot-1.8/contrib/realtime/mysql/musiconhold.sql (props changed)
team/oej/teapot-1.8/contrib/realtime/mysql/queue_log.sql (props changed)
team/oej/teapot-1.8/contrib/realtime/mysql/voicemail_data.sql (props changed)
team/oej/teapot-1.8/contrib/realtime/mysql/voicemail_messages.sql (props changed)
team/oej/teapot-1.8/doc/Makefile (props changed)
team/oej/teapot-1.8/include/asterisk/bridging_features.h (props changed)
team/oej/teapot-1.8/include/asterisk/bridging_technology.h (props changed)
team/oej/teapot-1.8/include/asterisk/select.h (props changed)
team/oej/teapot-1.8/main/devicestate.c
team/oej/teapot-1.8/res/res_config_ldap.c
team/oej/teapot-1.8/res/res_jabber.c
team/oej/teapot-1.8/res/res_mutestream.c (contents, props changed)
team/oej/teapot-1.8/res/res_rtp_multicast.c (contents, props changed)
team/oej/teapot-1.8/res/res_timing_kqueue.c (props changed)
team/oej/teapot-1.8/tests/test_expr.c (props changed)
team/oej/teapot-1.8/tests/test_func_file.c (props changed)
team/oej/teapot-1.8/tests/test_locale.c (props changed)
team/oej/teapot-1.8/tests/test_poll.c (props changed)
Propchange: team/oej/teapot-1.8/
------------------------------------------------------------------------------
automerge = Is-there-life-off-net?
Propchange: team/oej/teapot-1.8/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Apr 17 04:17:40 2013
@@ -1,1 +1,1 @@
-/branches/1.8:1-384884
+/branches/1.8:1-385958
Propchange: team/oej/teapot-1.8/BSDmakefile
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Wed Apr 17 04:17:40 2013
@@ -1,1 +1,1 @@
-'Date Author Id Revision Yoyo'
+Author Date Id Revision
Modified: team/oej/teapot-1.8/Makefile
URL: http://svnview.digium.com/svn/asterisk/team/oej/teapot-1.8/Makefile?view=diff&rev=385959&r1=385958&r2=385959
==============================================================================
--- team/oej/teapot-1.8/Makefile (original)
+++ team/oej/teapot-1.8/Makefile Wed Apr 17 04:17:40 2013
@@ -289,7 +289,7 @@
@echo " + $(mK) install +"
@echo " +-------------------------------------------+"
-_all: cleantest makeopts $(SUBDIRS) doc/core-en_US.xml
+_all: .lastclean makeopts $(SUBDIRS) doc/core-en_US.xml
makeopts: configure
@echo "****"
@@ -350,31 +350,30 @@
$(OTHER_SUBDIRS):
+ at _ASTCFLAGS="$(OTHER_SUBDIR_CFLAGS) $(_ASTCFLAGS)" ASTCFLAGS="$(ASTCFLAGS)" _ASTLDFLAGS="$(_ASTLDFLAGS)" ASTLDFLAGS="$(ASTLDFLAGS)" $(SUBMAKE) --no-builtin-rules -C $@ SUBDIR=$@ all
-defaults.h: makeopts cleantest
+defaults.h: makeopts .lastclean
@build_tools/make_defaults_h > $@.tmp
@cmp -s $@.tmp $@ || mv $@.tmp $@
@rm -f $@.tmp
-main/version.c: FORCE cleantest
+main/version.c: FORCE .lastclean
@build_tools/make_version_c > $@.tmp
@cmp -s $@.tmp $@ || mv $@.tmp $@
@rm -f $@.tmp
-include/asterisk/version.h: FORCE cleantest
+include/asterisk/version.h: FORCE .lastclean
@build_tools/make_version_h > $@.tmp
@cmp -s $@.tmp $@ || mv $@.tmp $@
@rm -f $@.tmp
-include/asterisk/buildopts.h: menuselect.makeopts cleantest
+include/asterisk/buildopts.h: menuselect.makeopts .lastclean
@build_tools/make_buildopts_h > $@.tmp
@cmp -s $@.tmp $@ || mv $@.tmp $@
@rm -f $@.tmp
-# build.h must depend on cleantest, or parallel make may wipe it out after it's
-# been created. But since build.h contains a timestamp, the cmp trick used above
-# won't work. Just testing for existence is good enough.
-include/asterisk/build.h: cleantest
- @test -f $@ || build_tools/make_build_h > $@
+# build.h must depend on .lastclean, or parallel make may wipe it out after it's
+# been created.
+include/asterisk/build.h: .lastclean
+ @build_tools/make_build_h > $@
$(SUBDIRS_CLEAN):
+@$(SUBMAKE) -C $(@:-clean=) clean
@@ -421,7 +420,7 @@
done
$(MAKE) -C sounds install
-doc/core-en_US.xml: cleantest $(foreach dir,$(MOD_SUBDIRS),$(shell $(GREP) -l "language=\"en_US\"" $(dir)/*.c $(dir)/*.cc 2>/dev/null))
+doc/core-en_US.xml: .lastclean $(foreach dir,$(MOD_SUBDIRS),$(shell $(GREP) -l "language=\"en_US\"" $(dir)/*.c $(dir)/*.cc 2>/dev/null))
@printf "Building Documentation For: "
@echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > $@
@echo "<!DOCTYPE docs SYSTEM \"appdocsxml.dtd\">" >> $@
@@ -762,8 +761,8 @@
# .cleancount is the global clean count, and .lastclean is the
# last clean count we had
-cleantest:
- @cmp -s .cleancount .lastclean || $(MAKE) clean
+.lastclean: .cleancount
+ @$(MAKE) clean
$(SUBDIRS_UNINSTALL):
+@$(SUBMAKE) -C $(@:-uninstall=) uninstall
@@ -876,7 +875,6 @@
.PHONY: distclean
.PHONY: all
.PHONY: prereqs
-.PHONY: cleantest
.PHONY: uninstall
.PHONY: _uninstall
.PHONY: uninstall-all
Modified: team/oej/teapot-1.8/UPGRADE.txt
URL: http://svnview.digium.com/svn/asterisk/team/oej/teapot-1.8/UPGRADE.txt?view=diff&rev=385959&r1=385958&r2=385959
==============================================================================
--- team/oej/teapot-1.8/UPGRADE.txt (original)
+++ team/oej/teapot-1.8/UPGRADE.txt Wed Apr 17 04:17:40 2013
@@ -18,6 +18,10 @@
===
===========================================================
+from 1.8.22.0 to 1.8.23.0:
+* The default settings for chan_sip are now overriden properly by the general
+ settings in sip.conf. Please look over your settings upon upgrading.
+
from 1.8.21.0 to 1.8.22.0:
* Added the 'n' option to MeetMe to prevent application of the DENOISE function
to a channel joining a conference. Some channel drivers that vary the number
Modified: team/oej/teapot-1.8/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/teapot-1.8/apps/app_queue.c?view=diff&rev=385959&r1=385958&r2=385959
==============================================================================
--- team/oej/teapot-1.8/apps/app_queue.c (original)
+++ team/oej/teapot-1.8/apps/app_queue.c Wed Apr 17 04:17:40 2013
@@ -8692,6 +8692,8 @@
res |= ast_manager_unregister("QueuePause");
res |= ast_manager_unregister("QueueLog");
res |= ast_manager_unregister("QueuePenalty");
+ res |= ast_manager_unregister("QueueReload");
+ res |= ast_manager_unregister("QueueReset");
res |= ast_unregister_application(app_aqm);
res |= ast_unregister_application(app_rqm);
res |= ast_unregister_application(app_pqm);
Propchange: team/oej/teapot-1.8/apps/app_saycounted.c
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Wed Apr 17 04:17:40 2013
@@ -1,1 +1,1 @@
-'Date Author Id Revision Yoyo'
+Author Date Id Revision
Modified: team/oej/teapot-1.8/apps/app_voicemail.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/teapot-1.8/apps/app_voicemail.c?view=diff&rev=385959&r1=385958&r2=385959
==============================================================================
--- team/oej/teapot-1.8/apps/app_voicemail.c (original)
+++ team/oej/teapot-1.8/apps/app_voicemail.c Wed Apr 17 04:17:40 2013
@@ -1507,6 +1507,14 @@
return res;
}
+/*!
+ * \brief Check if configuration file is valid
+ */
+static inline int valid_config(const struct ast_config *cfg)
+{
+ return cfg && cfg != CONFIG_STATUS_FILEINVALID;
+}
+
/*!
* \brief The handler for the change password option.
* \param vmu The voicemail user to work with.
@@ -1543,7 +1551,7 @@
}
/* Fall-through */
case OPT_PWLOC_VOICEMAILCONF:
- if ((cfg = ast_config_load(VOICEMAIL_CONFIG, config_flags)) && cfg != CONFIG_STATUS_FILEINVALID) {
+ if ((cfg = ast_config_load(VOICEMAIL_CONFIG, config_flags)) && valid_config(cfg)) {
while ((category = ast_category_browse(cfg, category))) {
if (!strcasecmp(category, vmu->context)) {
if (!(tmp = ast_variable_retrieve(cfg, category, vmu->mailbox))) {
@@ -1572,14 +1580,17 @@
reset_user_pw(vmu->context, vmu->mailbox, newpassword);
ast_copy_string(vmu->password, newpassword, sizeof(vmu->password));
ast_config_text_file_save(VOICEMAIL_CONFIG, cfg, "AppVoicemail");
+ ast_config_destroy(cfg);
break;
}
+
+ ast_config_destroy(cfg);
}
/* Fall-through */
case OPT_PWLOC_USERSCONF:
/* check users.conf and update the password stored for the mailbox */
/* if no vmsecret entry exists create one. */
- if ((cfg = ast_config_load("users.conf", config_flags)) && cfg != CONFIG_STATUS_FILEINVALID) {
+ if ((cfg = ast_config_load("users.conf", config_flags)) && valid_config(cfg)) {
ast_debug(4, "we are looking for %s\n", vmu->mailbox);
for (category = ast_category_browse(cfg, NULL); category; category = ast_category_browse(cfg, category)) {
ast_debug(4, "users.conf: %s\n", category);
@@ -1613,6 +1624,8 @@
ast_copy_string(vmu->password, newpassword, sizeof(vmu->password));
ast_config_text_file_save("users.conf", cfg, "AppVoicemail");
}
+
+ ast_config_destroy(cfg);
}
}
}
@@ -3846,7 +3859,7 @@
res = -1;
break;
}
- if (cfg && cfg != CONFIG_STATUS_FILEINVALID) {
+ if (valid_config(cfg)) {
if (!(idata.context = ast_variable_retrieve(cfg, "message", "context"))) {
idata.context = "";
}
@@ -3899,7 +3912,7 @@
if (obj) {
ast_odbc_release_obj(obj);
}
- if (cfg)
+ if (valid_config(cfg))
ast_config_destroy(cfg);
if (fdm != MAP_FAILED)
munmap(fdm, fdlen);
@@ -4378,7 +4391,7 @@
if (strlen(fromfile) < sizeof(fromfile) - 5) {
strcat(fromfile, ".txt");
}
- if (!(msg_cfg = ast_config_load(fromfile, config_flags))) {
+ if (!(msg_cfg = ast_config_load(fromfile, config_flags)) || !(valid_config(msg_cfg))) {
if (option_debug > 0) {
ast_log(LOG_DEBUG, "Config load for message text file '%s' failed\n", fromfile);
}
@@ -4753,7 +4766,7 @@
if (strlen(fromfile) < sizeof(fromfile) - 5) {
strcat(fromfile, ".txt");
}
- if ((msg_cfg = ast_config_load(fromfile, config_flags))) {
+ if ((msg_cfg = ast_config_load(fromfile, config_flags)) && valid_config(msg_cfg)) {
if ((v = ast_variable_retrieve(msg_cfg, "message", "callerid"))) {
ast_copy_string(origcallerid, v, sizeof(origcallerid));
}
@@ -6904,7 +6917,7 @@
strncat(backup, "-bak", sizeof(backup) - strlen(backup) - 1);
strncat(backup_textfile, "-bak.txt", sizeof(backup_textfile) - strlen(backup_textfile) - 1);
- if ((msg_cfg = ast_config_load(textfile, config_flags)) && msg_cfg != CONFIG_STATUS_FILEINVALID && (duration_str = ast_variable_retrieve(msg_cfg, "message", "duration"))) {
+ if ((msg_cfg = ast_config_load(textfile, config_flags)) && valid_config(msg_cfg) && (duration_str = ast_variable_retrieve(msg_cfg, "message", "duration"))) {
*duration = atoi(duration_str);
} else {
*duration = 0;
@@ -6937,7 +6950,7 @@
*duration = 0;
/* if we can't read the message metadata, stop now */
- if (!msg_cfg) {
+ if (!valid_config(msg_cfg)) {
cmd = 0;
break;
}
@@ -7021,7 +7034,7 @@
}
}
- if (msg_cfg)
+ if (valid_config(msg_cfg))
ast_config_destroy(msg_cfg);
if (prepend_duration)
*duration = prepend_duration;
@@ -7717,7 +7730,7 @@
snprintf(filename, sizeof(filename), "%s.txt", vms->fn);
RETRIEVE(vms->curdir, vms->curmsg, vmu->mailbox, vmu->context);
msg_cfg = ast_config_load(filename, config_flags);
- if (!msg_cfg || msg_cfg == CONFIG_STATUS_FILEINVALID) {
+ if (!valid_config(msg_cfg)) {
ast_log(LOG_WARNING, "No message attribute file?!! (%s)\n", filename);
return 0;
}
@@ -7795,7 +7808,7 @@
}
}
- if (!msg_cfg) {
+ if (!valid_config(msg_cfg)) {
ast_log(AST_LOG_WARNING, "No message attribute file?!! (%s)\n", filename);
return 0;
}
@@ -12573,7 +12586,7 @@
struct ast_flags config_flags = { 0 };
pwconf = ast_config_load(secretfn, config_flags);
- if (pwconf) {
+ if (valid_config(pwconf)) {
const char *val = ast_variable_retrieve(pwconf, "general", "password");
if (val) {
ast_copy_string(password, val, passwordlen);
@@ -13058,7 +13071,7 @@
fputs("00000002 => 9999,Mrs. Test\n", file);
fclose(file);
- if (!(cfg = ast_config_load(config_filename, config_flags))) {
+ if (!(cfg = ast_config_load(config_filename, config_flags)) || !valid_config(cfg)) {
res = AST_TEST_FAIL;
goto cleanup;
}
@@ -13279,7 +13292,7 @@
RETRIEVE(vms->curdir, vms->curmsg, vmu->mailbox, vmu->context);
msg_cfg = ast_config_load(filename, config_flags);
DISPOSE(vms->curdir, vms->curmsg);
- if (!msg_cfg || msg_cfg == CONFIG_STATUS_FILEINVALID) {
+ if (!valid_config(msg_cfg)) {
ast_log(AST_LOG_WARNING, "No message attribute file?!! (%s)\n", filename);
return 0;
}
@@ -13439,9 +13452,9 @@
break;
}
+ ast_config_destroy(msg_cfg);
+
#ifndef IMAP_STORAGE
- ast_config_destroy(msg_cfg);
-
if (!res) {
make_file(vms->fn, sizeof(vms->fn), vms->curdir, msg);
vms->heard[msg] = 1;
Propchange: team/oej/teapot-1.8/build_tools/sha1sum-sh
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Wed Apr 17 04:17:40 2013
@@ -1,1 +1,1 @@
-'Date Author Id Revision Yoyo'
+Author Date Id Revision
Modified: team/oej/teapot-1.8/channels/chan_alsa.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/teapot-1.8/channels/chan_alsa.c?view=diff&rev=385959&r1=385958&r2=385959
==============================================================================
--- team/oej/teapot-1.8/channels/chan_alsa.c (original)
+++ team/oej/teapot-1.8/channels/chan_alsa.c Wed Apr 17 04:17:40 2013
@@ -482,6 +482,13 @@
} else if (r >= 0) {
off -= r;
}
+
+ /* Return NULL frame on error */
+ if (r < 0) {
+ ast_mutex_unlock(&alsalock);
+ return &f;
+ }
+
/* Update positions */
readpos += r;
left -= r;
Modified: team/oej/teapot-1.8/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/teapot-1.8/channels/chan_iax2.c?view=diff&rev=385959&r1=385958&r2=385959
==============================================================================
--- team/oej/teapot-1.8/channels/chan_iax2.c (original)
+++ team/oej/teapot-1.8/channels/chan_iax2.c Wed Apr 17 04:17:40 2013
@@ -9608,6 +9608,9 @@
if (!cur_pkt_buf)
AST_LIST_INSERT_TAIL(&to_here->full_frames, pkt_buf, entry);
+
+ to_here->iostate = IAX_IOSTATE_READY;
+ ast_cond_signal(&to_here->cond);
ast_mutex_unlock(&to_here->lock);
}
@@ -12231,16 +12234,26 @@
ast_cond_init(&thread->cond, NULL);
ast_mutex_init(&thread->init_lock);
ast_cond_init(&thread->init_cond, NULL);
+
+ ast_mutex_lock(&thread->init_lock);
+
if (ast_pthread_create_background(&thread->threadid, NULL, iax2_process_thread, thread)) {
ast_log(LOG_WARNING, "Failed to create new thread!\n");
ast_mutex_destroy(&thread->lock);
ast_cond_destroy(&thread->cond);
+ ast_mutex_unlock(&thread->init_lock);
ast_mutex_destroy(&thread->init_lock);
ast_cond_destroy(&thread->init_cond);
ast_free(thread);
thread = NULL;
continue;
}
+ /* Wait for the thread to be ready */
+ ast_cond_wait(&thread->init_cond, &thread->init_lock);
+
+ /* Done with init_lock */
+ ast_mutex_unlock(&thread->init_lock);
+
AST_LIST_LOCK(&idle_list);
AST_LIST_INSERT_TAIL(&idle_list, thread, list);
AST_LIST_UNLOCK(&idle_list);
Propchange: team/oej/teapot-1.8/channels/chan_multicast_rtp.c
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Wed Apr 17 04:17:40 2013
@@ -1,1 +1,1 @@
-'Author Date Id Revision'
+Author Date Id Revision
Modified: team/oej/teapot-1.8/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/teapot-1.8/channels/chan_sip.c?view=diff&rev=385959&r1=385958&r2=385959
==============================================================================
--- team/oej/teapot-1.8/channels/chan_sip.c (original)
+++ team/oej/teapot-1.8/channels/chan_sip.c Wed Apr 17 04:17:40 2013
@@ -6752,6 +6752,11 @@
int res = 0;
struct sip_pvt *p = ast->tech_pvt;
+ if (!p) {
+ ast_debug(1, "Asked to answer channel %s without tech pvt; ignoring\n",
+ ast->name);
+ return res;
+ }
sip_pvt_lock(p);
if (ast->_state != AST_STATE_UP && ast_test_flag(&p->flags[2], SIP_PAGE3_INVITE_WAIT_FOR_PRACK)) {
ast_set_flag(&p->flags[2], SIP_PAGE3_ANSWER_WAIT_FOR_PRACK);
@@ -6927,6 +6932,12 @@
struct sip_pvt *p = ast->tech_pvt;
int res = 0;
+ if (!p) {
+ ast_debug(1, "Asked to begin DTMF digit on channel %s with no pvt; ignoring\n",
+ ast->name);
+ return res;
+ }
+
sip_pvt_lock(p);
switch (ast_test_flag(&p->flags[0], SIP_DTMF)) {
case SIP_DTMF_INBAND:
@@ -6950,6 +6961,12 @@
{
struct sip_pvt *p = ast->tech_pvt;
int res = 0;
+
+ if (!p) {
+ ast_debug(1, "Asked to end DTMF digit on channel %s with no pvt; ignoring\n",
+ ast->name);
+ return res;
+ }
sip_pvt_lock(p);
switch (ast_test_flag(&p->flags[0], SIP_DTMF)) {
@@ -6976,6 +6993,12 @@
struct sip_pvt *p = ast->tech_pvt;
int res;
+ if (!p) {
+ ast_debug(1, "Asked to transfer channel %s with no pvt; ignoring\n",
+ ast->name);
+ return -1;
+ }
+
if (dest == NULL) /* functions below do not take a NULL */
dest = "";
sip_pvt_lock(p);
@@ -7123,6 +7146,12 @@
{
struct sip_pvt *p = ast->tech_pvt;
int res = 0;
+
+ if (!p) {
+ ast_debug(1, "Asked to indicate condition on channel %s with no pvt; ignoring\n",
+ ast->name);
+ return res;
+ }
sip_pvt_lock(p);
switch(condition) {
@@ -27651,16 +27680,13 @@
}
} else if (!strcasecmp(v->name, "nat")) {
ast_set_flag(&mask[0], SIP_NAT_FORCE_RPORT);
- ast_set_flag(&flags[0], SIP_NAT_FORCE_RPORT); /* Default to "force_rport" */
- if (!strcasecmp(v->value, "no")) {
- ast_clear_flag(&flags[0], SIP_NAT_FORCE_RPORT);
- } else if (!strcasecmp(v->value, "yes")) {
- /* We've already defaulted to force_rport */
- ast_set_flag(&mask[1], SIP_PAGE2_SYMMETRICRTP);
+ ast_set_flag(&mask[1], SIP_PAGE2_SYMMETRICRTP);
+ if (!strcasecmp(v->value, "yes")) {
+ ast_set_flag(&flags[0], SIP_NAT_FORCE_RPORT);
ast_set_flag(&flags[1], SIP_PAGE2_SYMMETRICRTP);
+ } else if (!strcasecmp(v->value, "force_rport")) {
+ ast_set_flag(&flags[0], SIP_NAT_FORCE_RPORT);
} else if (!strcasecmp(v->value, "comedia")) {
- ast_clear_flag(&flags[0], SIP_NAT_FORCE_RPORT);
- ast_set_flag(&mask[1], SIP_PAGE2_SYMMETRICRTP);
ast_set_flag(&flags[1], SIP_PAGE2_SYMMETRICRTP);
}
} else if (!strcasecmp(v->name, "directmedia") || !strcasecmp(v->name, "canreinvite")) {
@@ -28815,7 +28841,8 @@
struct sip_peer *peer;
char *cat, *stringp, *context, *oldregcontext;
char newcontexts[AST_MAX_CONTEXT], oldcontexts[AST_MAX_CONTEXT];
- struct ast_flags dummy[2];
+ struct ast_flags mask[3] = {{0}};
+ struct ast_flags setflags[3] = {{0}};
struct ast_flags config_flags = { reason == CHANNEL_MODULE_LOAD ? 0 : ast_test_flag(&global_flags[1], SIP_PAGE2_RTCACHEFRIENDS) ? 0 : CONFIG_FLAG_FILEUNCHANGED };
int auto_sip_domains = FALSE;
struct ast_sockaddr old_bindaddr = bindaddr;
@@ -29051,10 +29078,10 @@
/* Read the [general] config section of sip.conf (or from realtime config) */
for (v = ast_variable_browse(cfg, "general"); v; v = v->next) {
- if (handle_common_options(&global_flags[0], &dummy[0], v)) {
+ if (handle_common_options(&setflags[0], &mask[0], v)) {
continue;
}
- if (handle_t38_options(&global_flags[0], &dummy[0], v, &global_t38_maxdatagram)) {
+ if (handle_t38_options(&setflags[0], &mask[0], v, &global_t38_maxdatagram)) {
continue;
}
/* handle jb conf */
@@ -29539,6 +29566,11 @@
ast_copy_string(default_parkinglot, v->value, sizeof(default_parkinglot));
}
}
+
+ /* Override global defaults if setting found in general section */
+ ast_copy_flags(&global_flags[0], &setflags[0], mask[0].flags);
+ ast_copy_flags(&global_flags[1], &setflags[1], mask[1].flags);
+ ast_copy_flags(&global_flags[2], &setflags[2], mask[2].flags);
if (subscribe_network_change) {
network_change_event_subscribe();
Propchange: team/oej/teapot-1.8/channels/sig_ss7.c
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Wed Apr 17 04:17:40 2013
@@ -1,1 +1,1 @@
-'Author Date Id Revision'
+Author Date Id Revision
Propchange: team/oej/teapot-1.8/channels/sig_ss7.h
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Wed Apr 17 04:17:40 2013
@@ -1,1 +1,1 @@
-'Author Date Id Revision'
+Author Date Id Revision
Modified: team/oej/teapot-1.8/configs/extconfig.conf.sample
URL: http://svnview.digium.com/svn/asterisk/team/oej/teapot-1.8/configs/extconfig.conf.sample?view=diff&rev=385959&r1=385958&r2=385959
==============================================================================
--- team/oej/teapot-1.8/configs/extconfig.conf.sample (original)
+++ team/oej/teapot-1.8/configs/extconfig.conf.sample Wed Apr 17 04:17:40 2013
@@ -53,13 +53,17 @@
; start at 1 and be sequential (i.e. if you have only priorities 1, 2,
; and 4, then 4 will be ignored, because there is no 3).
;
+;
+; Possible driver backends:
+;
; "odbc" is shown in the examples below, but is not the only valid realtime
-; engine. There is:
+; engine. Here are several of the possible options:
; odbc ... res_config_odbc
; sqlite ... res_config_sqlite
; pgsql ... res_config_pgsql
; curl ... res_config_curl
; ldap ... res_config_ldap
+; mysql ... res_config_mysql (available via add-ons in menuselect)
;
; Note: The res_config_pgsql and res_config_sqlite backends configure the
; database used in their respective configuration files and ignore the
Propchange: team/oej/teapot-1.8/configs/res_curl.conf.sample
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Wed Apr 17 04:17:40 2013
@@ -1,1 +1,1 @@
-'Date Author Id Revision Yoyo'
+Author Date Id Revision
Propchange: team/oej/teapot-1.8/contrib/realtime/mysql/musiconhold.sql
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Wed Apr 17 04:17:40 2013
@@ -1,1 +1,1 @@
-'Date Author Id Revision Yoyo'
+Author Date Id Revision
Propchange: team/oej/teapot-1.8/contrib/realtime/mysql/queue_log.sql
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Wed Apr 17 04:17:40 2013
@@ -1,1 +1,1 @@
-'Date Author Id Revision Yoyo'
+Author Date Id Revision
Propchange: team/oej/teapot-1.8/contrib/realtime/mysql/voicemail_data.sql
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Wed Apr 17 04:17:40 2013
@@ -1,1 +1,1 @@
-'Date Author Id Revision Yoyo'
+Author Date Id Revision
Propchange: team/oej/teapot-1.8/contrib/realtime/mysql/voicemail_messages.sql
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Wed Apr 17 04:17:40 2013
@@ -1,1 +1,1 @@
-'Date Author Id Revision Yoyo'
+Author Date Id Revision
Propchange: team/oej/teapot-1.8/doc/Makefile
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Wed Apr 17 04:17:40 2013
@@ -1,1 +1,1 @@
-'Date Author Id Revision Yoyo'
+Author Date Id Revision
Propchange: team/oej/teapot-1.8/include/asterisk/bridging_features.h
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Wed Apr 17 04:17:40 2013
@@ -1,1 +1,1 @@
-'Author Date Id Revision'
+Author Date Id Revision
Propchange: team/oej/teapot-1.8/include/asterisk/bridging_technology.h
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Wed Apr 17 04:17:40 2013
@@ -1,1 +1,1 @@
-'Author Date Id Revision'
+Author Date Id Revision
Propchange: team/oej/teapot-1.8/include/asterisk/select.h
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Wed Apr 17 04:17:40 2013
@@ -1,1 +1,1 @@
-'Date Author Id Revision Yoyo'
+Author Date Id Revision
Modified: team/oej/teapot-1.8/main/devicestate.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/teapot-1.8/main/devicestate.c?view=diff&rev=385959&r1=385958&r2=385959
==============================================================================
--- team/oej/teapot-1.8/main/devicestate.c (original)
+++ team/oej/teapot-1.8/main/devicestate.c Wed Apr 17 04:17:40 2013
@@ -705,7 +705,7 @@
static void devstate_change_collector_cb(const struct ast_event *event, void *data)
{
struct devstate_change *sc;
- const char *device;
+ const char *device, *cachable_str;
const struct ast_eid *eid;
uint32_t state;
enum ast_devstate_cache cachable = AST_DEVSTATE_CACHABLE;
@@ -713,7 +713,6 @@
device = ast_event_get_ie_str(event, AST_EVENT_IE_DEVICE);
eid = ast_event_get_ie_raw(event, AST_EVENT_IE_EID);
state = ast_event_get_ie_uint(event, AST_EVENT_IE_STATE);
- cachable = ast_event_get_ie_uint(event, AST_EVENT_IE_CACHABLE);
if (ast_strlen_zero(device) || !eid) {
ast_log(LOG_ERROR, "Invalid device state change event received\n");
@@ -726,6 +725,16 @@
strcpy(sc->device, device);
sc->eid = *eid;
sc->state = state;
+
+ /* For 'cachable' we cannot use ast_event_get_ie_uint(), it overwrites the default of AST_DEVSTATE_CACHABLE we
+ * have already setup for 'cachable', if for whatever reason the AST_EVENT_IE_CACHABLE wasn't
+ * posted in the event ast_event_get_ie_uint() is going will return 0,
+ * which equates to AST_DEVSTATE_NOT_CACHABLE the first enumeration in 'ast_devstate_cache'.
+ */
+
+ if ((cachable_str = ast_event_get_ie_str(event, AST_EVENT_IE_CACHABLE))) {
+ sscanf(cachable_str, "%30u", &cachable);
+ }
sc->cachable = cachable;
ast_mutex_lock(&devstate_collector.lock);
Modified: team/oej/teapot-1.8/res/res_config_ldap.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/teapot-1.8/res/res_config_ldap.c?view=diff&rev=385959&r1=385958&r2=385959
==============================================================================
--- team/oej/teapot-1.8/res/res_config_ldap.c (original)
+++ team/oej/teapot-1.8/res/res_config_ldap.c Wed Apr 17 04:17:40 2013
@@ -1229,14 +1229,14 @@
}
mods_size = 2; /* one for the first param/value pair and one for the the terminating NULL */
- ldap_mods = ast_calloc(sizeof(LDAPMod *), mods_size);
- ldap_mods[0] = ast_calloc(1, sizeof(LDAPMod));
+ ldap_mods = ldap_memcalloc(sizeof(LDAPMod *), mods_size);
+ ldap_mods[0] = ldap_memcalloc(1, sizeof(LDAPMod));
ldap_mods[0]->mod_op = LDAP_MOD_REPLACE;
- ldap_mods[0]->mod_type = ast_strdup(newparam);
+ ldap_mods[0]->mod_type = ldap_strdup(newparam);
ldap_mods[0]->mod_values = ast_calloc(sizeof(char *), 2);
- ldap_mods[0]->mod_values[0] = ast_strdup(newval);
+ ldap_mods[0]->mod_values[0] = ldap_strdup(newval);
while ((newparam = va_arg(ap, const char *))) {
newparam = convert_attribute_name_to_ldap(table_config, newparam);
@@ -1246,7 +1246,7 @@
for (i = 0; i < mods_size - 1; i++) {
if (ldap_mods[i]&& !strcmp(ldap_mods[i]->mod_type, newparam)) {
/* We have the parameter allready, adding the value as a semicolon delimited value */
- ldap_mods[i]->mod_values[0] = ast_realloc(ldap_mods[i]->mod_values[0], sizeof(char) * (strlen(ldap_mods[i]->mod_values[0]) + strlen(newval) + 2));
+ ldap_mods[i]->mod_values[0] = ldap_memrealloc(ldap_mods[i]->mod_values[0], sizeof(char) * (strlen(ldap_mods[i]->mod_values[0]) + strlen(newval) + 2));
strcat(ldap_mods[i]->mod_values[0], ";");
strcat(ldap_mods[i]->mod_values[0], newval);
mod_exists = 1;
@@ -1257,12 +1257,12 @@
/* create new mod */
if (!mod_exists) {
mods_size++;
- ldap_mods = ast_realloc(ldap_mods, sizeof(LDAPMod *) * mods_size);
+ ldap_mods = ldap_memrealloc(ldap_mods, sizeof(LDAPMod *) * mods_size);
ldap_mods[mods_size - 1] = NULL;
- ldap_mods[mods_size - 2] = ast_calloc(1, sizeof(LDAPMod));
-
- ldap_mods[mods_size - 2]->mod_type = ast_calloc(sizeof(char), strlen(newparam) + 1);
+ ldap_mods[mods_size - 2] = ldap_memcalloc(1, sizeof(LDAPMod));
+
+ ldap_mods[mods_size - 2]->mod_type = ldap_memcalloc(sizeof(char), strlen(newparam) + 1);
strcpy(ldap_mods[mods_size - 2]->mod_type, newparam);
if (strlen(newval) == 0) {
@@ -1270,8 +1270,8 @@
} else {
ldap_mods[mods_size - 2]->mod_op = LDAP_MOD_REPLACE;
- ldap_mods[mods_size - 2]->mod_values = ast_calloc(sizeof(char *), 2);
- ldap_mods[mods_size - 2]->mod_values[0] = ast_calloc(sizeof(char), strlen(newval) + 1);
+ ldap_mods[mods_size - 2]->mod_values = ldap_memcalloc(sizeof(char *), 2);
+ ldap_mods[mods_size - 2]->mod_values[0] = ldap_memcalloc(sizeof(char), strlen(newval) + 1);
strcpy(ldap_mods[mods_size - 2]->mod_values[0], newval);
}
}
Modified: team/oej/teapot-1.8/res/res_jabber.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/teapot-1.8/res/res_jabber.c?view=diff&rev=385959&r1=385958&r2=385959
==============================================================================
--- team/oej/teapot-1.8/res/res_jabber.c (original)
+++ team/oej/teapot-1.8/res/res_jabber.c Wed Apr 17 04:17:40 2013
@@ -3280,14 +3280,15 @@
return IKS_FILTER_EAT;
}
if (!strcasecmp(iks_name(item_content), "state")) {
+ if ((cachable_str = iks_find_attrib(item_content, "cachable"))) {
+ sscanf(cachable_str, "%30d", &cachable);
+ }
device_state = iks_find_cdata(item, "state");
- if ((cachable_str = iks_find_cdata(item, "cachable"))) {
- sscanf(cachable_str, "%30d", &cachable);
- }
if (!(event = ast_event_new(AST_EVENT_DEVICE_STATE_CHANGE,
AST_EVENT_IE_DEVICE, AST_EVENT_IE_PLTYPE_STR, item_id, AST_EVENT_IE_STATE,
AST_EVENT_IE_PLTYPE_UINT, ast_devstate_val(device_state), AST_EVENT_IE_EID,
AST_EVENT_IE_PLTYPE_RAW, &pubsub_eid, sizeof(pubsub_eid),
+ AST_EVENT_IE_CACHABLE, AST_EVENT_IE_PLTYPE_UINT, cachable,
AST_EVENT_IE_END))) {
return IKS_FILTER_EAT;
}
Modified: team/oej/teapot-1.8/res/res_mutestream.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/teapot-1.8/res/res_mutestream.c?view=diff&rev=385959&r1=385958&r2=385959
==============================================================================
--- team/oej/teapot-1.8/res/res_mutestream.c (original)
+++ team/oej/teapot-1.8/res/res_mutestream.c Wed Apr 17 04:17:40 2013
@@ -35,7 +35,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 89545 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
//#include <time.h>
//#include <string.h>
Propchange: team/oej/teapot-1.8/res/res_mutestream.c
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Wed Apr 17 04:17:40 2013
@@ -1,1 +1,1 @@
-"Author Date Id Revision"
+Author Date Id Revision
Modified: team/oej/teapot-1.8/res/res_rtp_multicast.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/teapot-1.8/res/res_rtp_multicast.c?view=diff&rev=385959&r1=385958&r2=385959
==============================================================================
--- team/oej/teapot-1.8/res/res_rtp_multicast.c (original)
+++ team/oej/teapot-1.8/res/res_rtp_multicast.c Wed Apr 17 04:17:40 2013
@@ -90,6 +90,8 @@
unsigned int ssrc;
/*! Sequence number, used when creating/sending the RTP packet */
uint16_t seqno;
+ unsigned int lastts;
+ struct timeval txcore;
};
/* Forward Declarations */
@@ -140,6 +142,30 @@
return 0;
}
+static int rtp_get_rate(format_t format)
+{
+ return (format == AST_FORMAT_G722) ? 8000 : ast_format_rate(format);
+}
+
+static unsigned int calc_txstamp(struct multicast_rtp *rtp, struct timeval *delivery)
+{
+ struct timeval t;
+ long ms;
+
+ if (ast_tvzero(rtp->txcore)) {
+ rtp->txcore = ast_tvnow();
+ rtp->txcore.tv_usec -= rtp->txcore.tv_usec % 20000;
+ }
+
+ t = (delivery && !ast_tvzero(*delivery)) ? *delivery : ast_tvnow();
+ if ((ms = ast_tvdiff_ms(t, rtp->txcore)) < 0) {
+ ms = 0;
+ }
+ rtp->txcore = t;
+
+ return (unsigned int) ms;
+}
+
/*! \brief Helper function which populates a control packet with useful information and sends it */
static int multicast_send_control_packet(struct ast_rtp_instance *instance, struct multicast_rtp *multicast, int command)
{
@@ -209,12 +235,15 @@
struct ast_frame *f = frame;
struct ast_sockaddr remote_address;
int hdrlen = 12, res = 0, codec;
+ int rate;
unsigned char *rtpheader;
+ unsigned int ms = calc_txstamp(multicast, &frame->delivery);
/* We only accept audio, nothing else */
if (frame->frametype != AST_FRAME_VOICE) {
return 0;
}
+ rate = rtp_get_rate(frame->subclass.codec) / 1000;
/* Grab the actual payload number for when we create the RTP packet */
if ((codec = ast_rtp_codecs_payload_code(ast_rtp_instance_get_codecs(instance), 1, frame->subclass.codec)) < 0) {
@@ -226,11 +255,20 @@
f = ast_frdup(frame);
}
+ /* Calucate last TS */
+ multicast->lastts = multicast->lastts + ms * rate;
+
/* Construct an RTP header for our packet */
rtpheader = (unsigned char *)(f->data.ptr - hdrlen);
put_unaligned_uint32(rtpheader, htonl((2 << 30) | (codec << 16) | (multicast->seqno)));
- put_unaligned_uint32(rtpheader + 4, htonl(f->ts * 8));
- put_unaligned_uint32(rtpheader + 8, htonl(multicast->ssrc));
+ put_unaligned_uint32(rtpheader + 4, htonl(multicast->lastts));
+
+ if (ast_test_flag(f, AST_FRFLAG_HAS_TIMING_INFO)) {
+ put_unaligned_uint32(rtpheader + 4, htonl(f->ts * 8));
+ }
+ else {
+ put_unaligned_uint32(rtpheader + 8, htonl(multicast->ssrc));
+ }
/* Increment sequence number and wrap to 0 if it overflows 16 bits. */
multicast->seqno = 0xFFFF & (multicast->seqno + 1);
Propchange: team/oej/teapot-1.8/res/res_rtp_multicast.c
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Wed Apr 17 04:17:40 2013
@@ -1,1 +1,1 @@
-'Author Date Id Revision'
+Author Date Id Revision
Propchange: team/oej/teapot-1.8/res/res_timing_kqueue.c
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Wed Apr 17 04:17:40 2013
@@ -1,1 +1,1 @@
-'Date Author Id Revision Yoyo'
+Author Date Id Revision
Propchange: team/oej/teapot-1.8/tests/test_expr.c
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Wed Apr 17 04:17:40 2013
@@ -1,1 +1,1 @@
-'Date Author Id Revision Yoyo'
+Author Date Id Revision
Propchange: team/oej/teapot-1.8/tests/test_func_file.c
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Wed Apr 17 04:17:40 2013
@@ -1,1 +1,1 @@
-'Date Author Id Revision Yoyo'
+Author Date Id Revision
Propchange: team/oej/teapot-1.8/tests/test_locale.c
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Wed Apr 17 04:17:40 2013
@@ -1,1 +1,1 @@
-'Date Author Id Revision Yoyo'
+Author Date Id Revision
Propchange: team/oej/teapot-1.8/tests/test_poll.c
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Wed Apr 17 04:17:40 2013
@@ -1,1 +1,1 @@
-'Date Author Id Revision Yoyo'
+Author Date Id Revision
More information about the asterisk-commits
mailing list