[svn-commits] oej: branch oej/set-sip-tonezone-1.8 r387406 - in /team/oej/set-sip-tonezone-...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu May 2 04:30:01 CDT 2013


Author: oej
Date: Thu May  2 04:27:45 2013
New Revision: 387406

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=387406
Log:
Reset

Modified:
    team/oej/set-sip-tonezone-1.8/   (props changed)
    team/oej/set-sip-tonezone-1.8/BSDmakefile   (props changed)
    team/oej/set-sip-tonezone-1.8/CHANGES
    team/oej/set-sip-tonezone-1.8/Makefile
    team/oej/set-sip-tonezone-1.8/UPGRADE.txt
    team/oej/set-sip-tonezone-1.8/apps/app_meetme.c
    team/oej/set-sip-tonezone-1.8/apps/app_queue.c
    team/oej/set-sip-tonezone-1.8/apps/app_saycounted.c   (props changed)
    team/oej/set-sip-tonezone-1.8/apps/app_voicemail.c
    team/oej/set-sip-tonezone-1.8/autoconf/ast_ext_lib.m4
    team/oej/set-sip-tonezone-1.8/build_tools/sha1sum-sh   (props changed)
    team/oej/set-sip-tonezone-1.8/channels/chan_alsa.c
    team/oej/set-sip-tonezone-1.8/channels/chan_dahdi.c
    team/oej/set-sip-tonezone-1.8/channels/chan_iax2.c
    team/oej/set-sip-tonezone-1.8/channels/chan_multicast_rtp.c   (props changed)
    team/oej/set-sip-tonezone-1.8/channels/chan_sip.c
    team/oej/set-sip-tonezone-1.8/channels/sig_pri.c
    team/oej/set-sip-tonezone-1.8/channels/sig_pri.h
    team/oej/set-sip-tonezone-1.8/channels/sig_ss7.c   (props changed)
    team/oej/set-sip-tonezone-1.8/channels/sig_ss7.h   (props changed)
    team/oej/set-sip-tonezone-1.8/channels/sip/include/sip.h
    team/oej/set-sip-tonezone-1.8/codecs/Makefile
    team/oej/set-sip-tonezone-1.8/configs/chan_dahdi.conf.sample
    team/oej/set-sip-tonezone-1.8/configs/extconfig.conf.sample
    team/oej/set-sip-tonezone-1.8/configs/res_curl.conf.sample   (props changed)
    team/oej/set-sip-tonezone-1.8/contrib/realtime/mysql/musiconhold.sql   (props changed)
    team/oej/set-sip-tonezone-1.8/contrib/realtime/mysql/queue_log.sql   (props changed)
    team/oej/set-sip-tonezone-1.8/contrib/realtime/mysql/sippeers.sql
    team/oej/set-sip-tonezone-1.8/contrib/realtime/mysql/voicemail_data.sql   (props changed)
    team/oej/set-sip-tonezone-1.8/contrib/realtime/mysql/voicemail_messages.sql   (props changed)
    team/oej/set-sip-tonezone-1.8/contrib/realtime/postgresql/realtime.sql
    team/oej/set-sip-tonezone-1.8/doc/Makefile   (props changed)
    team/oej/set-sip-tonezone-1.8/funcs/func_channel.c
    team/oej/set-sip-tonezone-1.8/funcs/func_curl.c
    team/oej/set-sip-tonezone-1.8/include/asterisk/bridging_features.h   (props changed)
    team/oej/set-sip-tonezone-1.8/include/asterisk/bridging_technology.h   (props changed)
    team/oej/set-sip-tonezone-1.8/include/asterisk/select.h   (props changed)
    team/oej/set-sip-tonezone-1.8/include/asterisk/utils.h
    team/oej/set-sip-tonezone-1.8/main/cdr.c
    team/oej/set-sip-tonezone-1.8/main/channel.c
    team/oej/set-sip-tonezone-1.8/main/cli.c
    team/oej/set-sip-tonezone-1.8/main/config.c
    team/oej/set-sip-tonezone-1.8/main/devicestate.c
    team/oej/set-sip-tonezone-1.8/main/features.c
    team/oej/set-sip-tonezone-1.8/main/http.c
    team/oej/set-sip-tonezone-1.8/main/manager.c
    team/oej/set-sip-tonezone-1.8/main/tcptls.c
    team/oej/set-sip-tonezone-1.8/main/utils.c
    team/oej/set-sip-tonezone-1.8/pbx/pbx_spool.c
    team/oej/set-sip-tonezone-1.8/res/res_config_curl.c
    team/oej/set-sip-tonezone-1.8/res/res_config_ldap.c
    team/oej/set-sip-tonezone-1.8/res/res_jabber.c
    team/oej/set-sip-tonezone-1.8/res/res_mutestream.c   (contents, props changed)
    team/oej/set-sip-tonezone-1.8/res/res_rtp_asterisk.c
    team/oej/set-sip-tonezone-1.8/res/res_rtp_multicast.c   (contents, props changed)
    team/oej/set-sip-tonezone-1.8/res/res_timing_kqueue.c   (props changed)
    team/oej/set-sip-tonezone-1.8/res/res_timing_pthread.c
    team/oej/set-sip-tonezone-1.8/sounds/Makefile
    team/oej/set-sip-tonezone-1.8/tests/test_expr.c   (props changed)
    team/oej/set-sip-tonezone-1.8/tests/test_func_file.c   (props changed)
    team/oej/set-sip-tonezone-1.8/tests/test_locale.c   (props changed)
    team/oej/set-sip-tonezone-1.8/tests/test_poll.c   (props changed)

Propchange: team/oej/set-sip-tonezone-1.8/
------------------------------------------------------------------------------
    automerge = Is-there-life-off-net?

Propchange: team/oej/set-sip-tonezone-1.8/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu May  2 04:27:45 2013
@@ -1,1 +1,1 @@
-/branches/1.8:1-383009
+/branches/1.8:1-387400

Propchange: team/oej/set-sip-tonezone-1.8/BSDmakefile
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu May  2 04:27:45 2013
@@ -1,1 +1,1 @@
-'Date Author Id Revision Yoyo'
+Author Date Id Revision

Modified: team/oej/set-sip-tonezone-1.8/CHANGES
URL: http://svnview.digium.com/svn/asterisk/team/oej/set-sip-tonezone-1.8/CHANGES?view=diff&rev=387406&r1=387405&r2=387406
==============================================================================
--- team/oej/set-sip-tonezone-1.8/CHANGES (original)
+++ team/oej/set-sip-tonezone-1.8/CHANGES Thu May  2 04:27:45 2013
@@ -7,6 +7,15 @@
 === and the other UPGRADE files for older releases.
 ===
 ======================================================================
+
+------------------------------------------------------------------------------
+--- Functionality changes since Asterisk 1.8.19.1 ----------------------------
+------------------------------------------------------------------------------
+
+App_queue
+---------
+ * App_queue will now play periodic announcements for the caller that
+   holds the first position in the queue while waiting for answer.
 
 ------------------------------------------------------------------------------
 --- Functionality changes since Asterisk 1.8.12.0 ----------------------------

Modified: team/oej/set-sip-tonezone-1.8/Makefile
URL: http://svnview.digium.com/svn/asterisk/team/oej/set-sip-tonezone-1.8/Makefile?view=diff&rev=387406&r1=387405&r2=387406
==============================================================================
--- team/oej/set-sip-tonezone-1.8/Makefile (original)
+++ team/oej/set-sip-tonezone-1.8/Makefile Thu May  2 04:27:45 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,30 +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
+defaults.h: makeopts .lastclean
 	@build_tools/make_defaults_h > $@.tmp
 	@cmp -s $@.tmp $@ || mv $@.tmp $@
 	@rm -f $@.tmp
 
-main/version.c: FORCE
+main/version.c: FORCE .lastclean
 	@build_tools/make_version_c > $@.tmp
 	@cmp -s $@.tmp $@ || mv $@.tmp $@
 	@rm -f $@.tmp
 
-include/asterisk/version.h: FORCE
+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
+include/asterisk/buildopts.h: menuselect.makeopts .lastclean
 	@build_tools/make_buildopts_h > $@.tmp
 	@cmp -s $@.tmp $@ || mv $@.tmp $@
 	@rm -f $@.tmp
 
-include/asterisk/build.h:
-	@build_tools/make_build_h > $@.tmp
-	@cmp -s $@.tmp $@ || mv $@.tmp $@
-	@rm -f $@.tmp
+# 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
@@ -420,7 +420,7 @@
 	done
 	$(MAKE) -C sounds install
 
-doc/core-en_US.xml: $(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\">" >> $@
@@ -761,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
@@ -875,7 +875,6 @@
 .PHONY: distclean
 .PHONY: all
 .PHONY: prereqs
-.PHONY: cleantest
 .PHONY: uninstall
 .PHONY: _uninstall
 .PHONY: uninstall-all

Modified: team/oej/set-sip-tonezone-1.8/UPGRADE.txt
URL: http://svnview.digium.com/svn/asterisk/team/oej/set-sip-tonezone-1.8/UPGRADE.txt?view=diff&rev=387406&r1=387405&r2=387406
==============================================================================
--- team/oej/set-sip-tonezone-1.8/UPGRADE.txt (original)
+++ team/oej/set-sip-tonezone-1.8/UPGRADE.txt Thu May  2 04:27:45 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/set-sip-tonezone-1.8/apps/app_meetme.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/set-sip-tonezone-1.8/apps/app_meetme.c?view=diff&rev=387406&r1=387405&r2=387406
==============================================================================
--- team/oej/set-sip-tonezone-1.8/apps/app_meetme.c (original)
+++ team/oej/set-sip-tonezone-1.8/apps/app_meetme.c Thu May  2 04:27:45 2013
@@ -5637,7 +5637,16 @@
 			ringing_trunk = sla_choose_ringing_trunk(ringing_station->station, &s_trunk_ref, 1);
 			ast_mutex_unlock(&sla.lock);
 			if (!ringing_trunk) {
+				/* This case happens in a bit of a race condition.  If two stations answer
+				 * the outbound call at the same time, the first one will get connected to
+				 * the trunk.  When the second one gets here, it will not see any trunks
+				 * ringing so we have no idea what to conect it to.  So, we just hang up
+				 * on it. */
 				ast_debug(1, "Found no ringing trunk for station '%s' to answer!\n", ringing_station->station->name);
+				ast_dial_join(ringing_station->station->dial);
+				ast_dial_destroy(ringing_station->station->dial);
+				ringing_station->station->dial = NULL;
+				ast_free(ringing_station);
 				break;
 			}
 			/* Track the channel that answered this trunk */

Modified: team/oej/set-sip-tonezone-1.8/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/set-sip-tonezone-1.8/apps/app_queue.c?view=diff&rev=387406&r1=387405&r2=387406
==============================================================================
--- team/oej/set-sip-tonezone-1.8/apps/app_queue.c (original)
+++ team/oej/set-sip-tonezone-1.8/apps/app_queue.c Thu May  2 04:27:45 2013
@@ -3607,7 +3607,7 @@
  *
  * \todo eventually all call forward logic should be intergerated into and replaced by ast_call_forward()
  */
-static struct callattempt *wait_for_answer(struct queue_ent *qe, struct callattempt *outgoing, int *to, char *digit, int prebusies, int caller_disconnect, int forwardsallowed)
+static struct callattempt *wait_for_answer(struct queue_ent *qe, struct callattempt *outgoing, int *to, char *digit, int prebusies, int caller_disconnect, int forwardsallowed, int ringing)
 {
 	const char *queue = qe->parent->name;
 	struct callattempt *o, *start = NULL, *prev = NULL;
@@ -4087,6 +4087,16 @@
 		}
 	}
 
+	/* Make a position announcement, if enabled */
+ 	if (qe->parent->announcefrequency) {
+		say_position(qe, ringing);
+	}
+
+ 	/* Make a periodic announcement, if enabled */
+ 	if (qe->parent->periodicannouncefrequency) {
+ 		say_periodic_announcement(qe, ringing);
+ 	}
+ 
 	if (!*to) {
 		for (o = start; o; o = o->call_next) {
 			rna(orig, qe, o->interface, o->member->membername, 1);
@@ -4833,7 +4843,7 @@
 	ring_one(qe, outgoing, &numbusies);
 	lpeer = wait_for_answer(qe, outgoing, &to, &digit, numbusies,
 		ast_test_flag(&(bridge_config.features_caller), AST_FEATURE_DISCONNECT),
-		forwardsallowed);
+		forwardsallowed, ringing);
 	/* The ast_channel_datastore_remove() function could fail here if the
 	 * datastore was moved to another channel during a masquerade. If this is
 	 * the case, don't free the datastore here because later, when the channel
@@ -8692,6 +8702,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/set-sip-tonezone-1.8/apps/app_saycounted.c
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu May  2 04:27:45 2013
@@ -1,1 +1,1 @@
-'Date Author Id Revision Yoyo'
+Author Date Id Revision

Modified: team/oej/set-sip-tonezone-1.8/apps/app_voicemail.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/set-sip-tonezone-1.8/apps/app_voicemail.c?view=diff&rev=387406&r1=387405&r2=387406
==============================================================================
--- team/oej/set-sip-tonezone-1.8/apps/app_voicemail.c (original)
+++ team/oej/set-sip-tonezone-1.8/apps/app_voicemail.c Thu May  2 04:27:45 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));
 				}
@@ -5566,7 +5579,10 @@
 		if (inboxcount2(ext_context, &urgentvoicemails, &newvoicemails, &oldvoicemails)) {
 			ast_log(AST_LOG_ERROR, "Problem in calculating number of voicemail messages available for extension %s\n", extension);
 		} else {
-			snprintf(arguments, sizeof(arguments), "%s %s %s %d %d %d &", externnotify, context, extension, newvoicemails, oldvoicemails, urgentvoicemails);
+			snprintf(arguments, sizeof(arguments), "%s %s %s %d %d %d &",
+				externnotify, S_OR(context, "\"\""),
+				extension, newvoicemails,
+				oldvoicemails, urgentvoicemails);
 			ast_debug(1, "Executing %s\n", arguments);
 			ast_safe_system(arguments);
 		}
@@ -6901,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;
@@ -6934,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;
 			}
@@ -7018,7 +7034,7 @@
 		}
 	}
 
-	if (msg_cfg)
+	if (valid_config(msg_cfg))
 		ast_config_destroy(msg_cfg);
 	if (prepend_duration)
 		*duration = prepend_duration;
@@ -7714,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;
 	}
@@ -7792,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;
 	}
@@ -12570,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);
@@ -13055,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;
 	}
@@ -13276,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;
 	}
@@ -13436,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;

Modified: team/oej/set-sip-tonezone-1.8/autoconf/ast_ext_lib.m4
URL: http://svnview.digium.com/svn/asterisk/team/oej/set-sip-tonezone-1.8/autoconf/ast_ext_lib.m4?view=diff&rev=387406&r1=387405&r2=387406
==============================================================================
--- team/oej/set-sip-tonezone-1.8/autoconf/ast_ext_lib.m4 (original)
+++ team/oej/set-sip-tonezone-1.8/autoconf/ast_ext_lib.m4 Thu May  2 04:27:45 2013
@@ -112,9 +112,9 @@
    # if --with-$1=DIR has been specified, use it.
    if test "x${$1_DIR}" != "x"; then
       if test -d ${$1_DIR}/lib; then
-      	 pbxlibdir="-L${$1_DIR}/lib"
+         pbxlibdir="-L${$1_DIR}/lib"
       else
-      	 pbxlibdir="-L${$1_DIR}"
+         pbxlibdir="-L${$1_DIR}"
       fi
    fi
    pbxfuncname="$3"

Propchange: team/oej/set-sip-tonezone-1.8/build_tools/sha1sum-sh
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu May  2 04:27:45 2013
@@ -1,1 +1,1 @@
-'Date Author Id Revision Yoyo'
+Author Date Id Revision

Modified: team/oej/set-sip-tonezone-1.8/channels/chan_alsa.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/set-sip-tonezone-1.8/channels/chan_alsa.c?view=diff&rev=387406&r1=387405&r2=387406
==============================================================================
--- team/oej/set-sip-tonezone-1.8/channels/chan_alsa.c (original)
+++ team/oej/set-sip-tonezone-1.8/channels/chan_alsa.c Thu May  2 04:27:45 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/set-sip-tonezone-1.8/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/set-sip-tonezone-1.8/channels/chan_dahdi.c?view=diff&rev=387406&r1=387405&r2=387406
==============================================================================
--- team/oej/set-sip-tonezone-1.8/channels/chan_dahdi.c (original)
+++ team/oej/set-sip-tonezone-1.8/channels/chan_dahdi.c Thu May  2 04:27:45 2013
@@ -1365,6 +1365,7 @@
 			.localdialplan = PRI_NATIONAL_ISDN + 1,
 			.nodetype = PRI_CPE,
 			.qsigchannelmapping = DAHDI_CHAN_MAPPING_PHYSICAL,
+			.inband_on_proceeding = 1,
 
 #if defined(HAVE_PRI_CCSS)
 			.cc_ptmp_recall_mode = 1,/* specificRecall */
@@ -5014,9 +5015,12 @@
 				if (drc) {
 					k = drc_sample(k, drc);
 				}
-				k = (float)k*linear_gain;
-				if (k > 32767) k = 32767;
-				if (k < -32767) k = -32767;
+				k = (float)k * linear_gain;
+				if (k > 32767) {
+					k = 32767;
+				} else if (k < -32768) {
+					k = -32768;
+				}
 				g->txgain[j] = AST_LIN2A(k);
 			} else {
 				g->txgain[j] = j;
@@ -5030,9 +5034,12 @@
 				if (drc) {
 					k = drc_sample(k, drc);
 				}
-				k = (float)k*linear_gain;
-				if (k > 32767) k = 32767;
-				if (k < -32767) k = -32767;
+				k = (float)k * linear_gain;
+				if (k > 32767) {
+					k = 32767;
+				} else if (k < -32768) {
+					k = -32768;
+				}
 				g->txgain[j] = AST_LIN2MU(k);
 
 			} else {
@@ -5057,9 +5064,12 @@
 				if (drc) {
 					k = drc_sample(k, drc);
 				}
-				k = (float)k*linear_gain;
-				if (k > 32767) k = 32767;
-				if (k < -32767) k = -32767;
+				k = (float)k * linear_gain;
+				if (k > 32767) {
+					k = 32767;
+				} else if (k < -32768) {
+					k = -32768;
+				}
 				g->rxgain[j] = AST_LIN2A(k);
 			} else {
 				g->rxgain[j] = j;
@@ -5073,9 +5083,12 @@
 				if (drc) {
 					k = drc_sample(k, drc);
 				}
-				k = (float)k*linear_gain;
-				if (k > 32767) k = 32767;
-				if (k < -32767) k = -32767;
+				k = (float)k * linear_gain;
+				if (k > 32767) {
+					k = 32767;
+				} else if (k < -32768) {
+					k = -32768;
+				}
 				g->rxgain[j] = AST_LIN2MU(k);
 			} else {
 				g->rxgain[j] = j;
@@ -12680,6 +12693,7 @@
 							pris[span].pri.layer1_ignored = 0;
 						}
 						pris[span].pri.append_msn_to_user_tag = conf->pri.pri.append_msn_to_user_tag;
+						pris[span].pri.inband_on_proceeding = conf->pri.pri.inband_on_proceeding;
 						ast_copy_string(pris[span].pri.initial_user_tag, conf->chan.cid_tag, sizeof(pris[span].pri.initial_user_tag));
 						ast_copy_string(pris[span].pri.msn_list, conf->pri.pri.msn_list, sizeof(pris[span].pri.msn_list));
 #if defined(HAVE_PRI_MWI)
@@ -17677,6 +17691,8 @@
 #endif	/* defined(HAVE_PRI_MWI) */
 			} else if (!strcasecmp(v->name, "append_msn_to_cid_tag")) {
 				confp->pri.pri.append_msn_to_user_tag = ast_true(v->value);
+			} else if (!strcasecmp(v->name, "inband_on_proceeding")) {
+				confp->pri.pri.inband_on_proceeding = ast_true(v->value);
 			} else if (!strcasecmp(v->name, "layer1_presence")) {
 				if (!strcasecmp(v->value, "required")) {
 					confp->pri.pri.layer1_ignored = 0;

Modified: team/oej/set-sip-tonezone-1.8/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/set-sip-tonezone-1.8/channels/chan_iax2.c?view=diff&rev=387406&r1=387405&r2=387406
==============================================================================
--- team/oej/set-sip-tonezone-1.8/channels/chan_iax2.c (original)
+++ team/oej/set-sip-tonezone-1.8/channels/chan_iax2.c Thu May  2 04:27:45 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/set-sip-tonezone-1.8/channels/chan_multicast_rtp.c
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu May  2 04:27:45 2013
@@ -1,1 +1,1 @@
-'Author Date Id Revision'
+Author Date Id Revision

Modified: team/oej/set-sip-tonezone-1.8/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/set-sip-tonezone-1.8/channels/chan_sip.c?view=diff&rev=387406&r1=387405&r2=387406
==============================================================================
--- team/oej/set-sip-tonezone-1.8/channels/chan_sip.c (original)
+++ team/oej/set-sip-tonezone-1.8/channels/chan_sip.c Thu May  2 04:27:45 2013
@@ -1112,6 +1112,11 @@
 static struct ao2_container *peers;
 static struct ao2_container *peers_by_ip;
 
+/*! \brief  A bogus peer, to be used when authentication should fail */
+static struct sip_peer *bogus_peer;
+/*! \brief  We can recognise the bogus peer by this invalid MD5 hash */
+#define BOGUS_PEER_MD5SECRET "intentionally_invalid_md5_string"
+
 /*! \brief  The register list: Other SIP proxies we register with and receive calls from */
 static struct ast_register_list {
 	ASTOBJ_CONTAINER_COMPONENTS(struct sip_registry);
@@ -1207,6 +1212,8 @@
 	else					\
 		(head) = (element)->next;	\
 	} while (0)
+
+struct show_peers_context;
 
 /*---------------------------- Forward declarations of functions in chan_sip.c */
 /* Note: This is added to help splitting up chan_sip.c into several files
@@ -1252,7 +1259,7 @@
 static int transmit_response_with_auth(struct sip_pvt *p, const char *msg, const struct sip_request *req, const char *rand, enum xmittype reliable, const char *header, int stale);
 static int transmit_provisional_response(struct sip_pvt *p, const char *msg, const struct sip_request *req, int with_sdp);
 static int transmit_response_with_allow(struct sip_pvt *p, const char *msg, const struct sip_request *req, enum xmittype reliable);
-static void transmit_fake_auth_response(struct sip_pvt *p, int sipmethod, struct sip_request *req, enum xmittype reliable);
+static void transmit_fake_auth_response(struct sip_pvt *p, struct sip_request *req, enum xmittype reliable);
 static int transmit_request(struct sip_pvt *p, int sipmethod, uint32_t seqno, enum xmittype reliable, int newbranch);
 static int transmit_request_with_auth(struct sip_pvt *p, int sipmethod, uint32_t seqno, enum xmittype reliable, int newbranch);
 static int transmit_publish(struct sip_epa_entry *epa_entry, enum sip_publish_type publish_type, const char * const explicit_uri);
@@ -1374,6 +1381,7 @@
 static int peer_status(struct sip_peer *peer, char *status, int statuslen);
 static char *sip_show_sched(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a);
 static char * _sip_show_peers(int fd, int *total, struct mansession *s, const struct message *m, int argc, const char *argv[]);
+static struct sip_peer *_sip_show_peers_one(int fd, struct mansession *s, struct show_peers_context *cont, struct sip_peer *peer);
 static char *sip_show_peers(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a);
 static char *sip_show_objects(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a);
 static void  print_group(int fd, ast_group_t group, int crlf);
@@ -1488,7 +1496,7 @@
 static int get_also_info(struct sip_pvt *p, struct sip_request *oreq);
 static int parse_ok_contact(struct sip_pvt *pvt, struct sip_request *req);
 static int set_address_from_contact(struct sip_pvt *pvt);
-static void check_via(struct sip_pvt *p, struct sip_request *req);
+static void check_via(struct sip_pvt *p, const struct sip_request *req);
 static int get_rpid(struct sip_pvt *p, struct sip_request *oreq);
 static int get_rdnis(struct sip_pvt *p, struct sip_request *oreq, char **name, char **number, int *reason);
 static enum sip_get_dest_result get_destination(struct sip_pvt *p, struct sip_request *oreq, int *cc_recall_core_id);
@@ -6874,6 +6882,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) {
 		try_suggested_sip_codec(p);	
@@ -7043,6 +7056,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:
@@ -7066,6 +7085,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)) {
@@ -7092,6 +7117,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);
@@ -7239,6 +7270,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) {
@@ -14676,7 +14713,9 @@
 		ast_verbose(VERBOSE_PREFIX_3 "Registered SIP '%s' at %s\n", peer->name,
 				ast_sockaddr_stringify(&peer->addr));
 	}
+	sip_pvt_unlock(pvt);
 	sip_poke_peer(peer, 0);
+	sip_pvt_lock(pvt);
 	register_peer_exten(peer, 1);
 	
 	/* Save User agent */
@@ -14863,6 +14902,7 @@
 	char a1_hash[256];
 	char resp_hash[256]="";
 	char *c;
+	int is_bogus_peer = 0;
 	int  wrongnonce = FALSE;
 	int  good_response;
 	const char *usednonce = p->randdata;
@@ -14957,8 +14997,14 @@
 		}
 	}
 
+	/* We cannot rely on the bogus_peer having a bad md5 value. Someone could
+	 * use it to construct valid auth. */
+	if (md5secret && strcmp(md5secret, BOGUS_PEER_MD5SECRET) == 0) {
+		is_bogus_peer = 1;
+	}
+
 	/* Verify that digest username matches  the username we auth as */
-	if (strcmp(username, keys[K_USER].s)) {
+	if (strcmp(username, keys[K_USER].s) && !is_bogus_peer) {
 		ast_log(LOG_WARNING, "username mismatch, have <%s>, digest has <%s>\n",
 			username, keys[K_USER].s);
 		/* Oops, we're trying something here */
@@ -14997,7 +15043,8 @@
 	}
 
 	good_response = keys[K_RESP].s &&
-			!strncasecmp(keys[K_RESP].s, resp_hash, strlen(resp_hash));
+			!strncasecmp(keys[K_RESP].s, resp_hash, strlen(resp_hash)) &&
+			!is_bogus_peer; /* lastly, check that the peer isn't the fake peer */
 	if (wrongnonce) {
 		if (good_response) {
 			if (sipdebug)
@@ -15141,7 +15188,7 @@
 /*! \brief Send a fake 401 Unauthorized response when the administrator
   wants to hide the names of local devices  from fishers
  */
-static void transmit_fake_auth_response(struct sip_pvt *p, int sipmethod, struct sip_request *req, enum xmittype reliable)
+static void transmit_fake_auth_response(struct sip_pvt *p, struct sip_request *req, enum xmittype reliable)
 {
 	/* We have to emulate EXACTLY what we'd get with a good peer
 	 * and a bad password, or else we leak information. */
@@ -15180,13 +15227,13 @@
 	}
 
 	if (!(buf = ast_str_thread_get(&check_auth_buf, CHECK_AUTH_BUF_INITLEN))) {
-		transmit_response(p, "403 Forbidden (Bad auth)", &p->initreq);
+		__transmit_response(p, "403 Forbidden", &p->initreq, reliable);
 		return;
 	}
 
 	/* Make a copy of the response and parse it */
 	if (ast_str_set(&buf, 0, "%s", authtoken) == AST_DYNSTR_BUILD_FAILED) {
-		transmit_response(p, "403 Forbidden (Bad auth)", &p->initreq);
+		__transmit_response(p, "403 Forbidden", &p->initreq, reliable);
 		return;
 	}
 
@@ -15224,7 +15271,7 @@
 		/* Schedule auto destroy in 32 seconds */
 		sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
 	} else {
-		transmit_response(p, "403 Forbidden (Bad auth)", &p->initreq);
+		__transmit_response(p, "403 Forbidden", &p->initreq, reliable);
 	}
 }
 
@@ -15334,7 +15381,7 @@
 	if (!AST_LIST_EMPTY(&domain_list)) {
 		if (!check_sip_domain(domain, NULL, 0)) {
 			if (sip_cfg.alwaysauthreject) {
-				transmit_fake_auth_response(p, SIP_REGISTER, &p->initreq, XMIT_UNRELIABLE);
+				transmit_fake_auth_response(p, &p->initreq, XMIT_UNRELIABLE);
 			} else {
 				transmit_response(p, "404 Not found (unknown domain)", &p->initreq);
 			}
@@ -15360,6 +15407,13 @@
 		}
 	}
 	peer = find_peer(name, NULL, TRUE, FINDPEERS, FALSE, 0);
+
+	/* If we don't want username disclosure, use the bogus_peer when a user
+	 * is not found. */
+	if (!peer && sip_cfg.alwaysauthreject && !sip_cfg.autocreatepeer) {
+		peer = bogus_peer;
+		ref_peer(peer, "register_verify: ref the bogus_peer");
+	}
 
 	if (!(peer && ast_apply_ha(peer->ha, addr))) {
 		/* Peer fails ACL check */
@@ -15436,7 +15490,7 @@
 			switch (parse_register_contact(p, peer, req)) {
 			case PARSE_REGISTER_DENIED:
 				ast_log(LOG_WARNING, "Registration denied because of contact ACL\n");
-				transmit_response_with_date(p, "403 Forbidden (ACL)", req);
+				transmit_response_with_date(p, "403 Forbidden", req);
 				res = 0;
 				break;
 			case PARSE_REGISTER_FAILED:
@@ -15464,7 +15518,9 @@
 	}
 	if (!res) {
 		if (send_mwi) {
+			sip_pvt_unlock(p);
 			sip_send_mwi_to_peer(peer, 0);
+			sip_pvt_lock(p);
 		} else {
 			update_peer_lastmsgssent(peer, -1, 0);
 		}
@@ -15474,7 +15530,7 @@
 		switch (res) {
 		case AUTH_SECRET_FAILED:
 			/* Wrong password in authentication. Go away, don't try again until you fixed it */
-			transmit_response(p, "403 Forbidden (Bad auth)", &p->initreq);
+			transmit_response(p, "403 Forbidden", &p->initreq);
 			if (global_authfailureevents) {
 				const char *peer_addr = ast_strdupa(ast_sockaddr_stringify_addr(addr));
 				const char *peer_port = ast_strdupa(ast_sockaddr_stringify_port(addr));
@@ -15497,7 +15553,7 @@
 		case AUTH_PEER_NOT_DYNAMIC:
 		case AUTH_ACL_FAILED:
 			if (sip_cfg.alwaysauthreject) {
-				transmit_fake_auth_response(p, SIP_REGISTER, &p->initreq, XMIT_UNRELIABLE);
+				transmit_fake_auth_response(p, &p->initreq, XMIT_UNRELIABLE);
 				if (global_authfailureevents) {
 					const char *peer_addr = ast_strdupa(ast_sockaddr_stringify_addr(addr));
 					const char *peer_port = ast_strdupa(ast_sockaddr_stringify_port(addr));
@@ -16433,7 +16489,7 @@
 }
 
 /*! \brief check Via: header for hostname, port and rport request/answer */
-static void check_via(struct sip_pvt *p, struct sip_request *req)
+static void check_via(struct sip_pvt *p, const struct sip_request *req)
 {
 	char via[512];
 	char *c, *maddr;
@@ -16527,7 +16583,19 @@
 			ast_verbose("No matching peer for '%s' from '%s'\n",
 				of, ast_sockaddr_stringify(&p->recv));
 		}
-		return AUTH_DONT_KNOW;
+
+		/* If you don't mind, we can return 404s for devices that do
+		 * not exist: username disclosure. If we allow guests, there
+		 * is no way around that. */
+		if (sip_cfg.allowguest || !sip_cfg.alwaysauthreject) {
+			return AUTH_DONT_KNOW;
+		}
+
+		/* If you do mind, we use a peer that will never authenticate.
+		 * This ensures that we follow the same code path as regular
+		 * auth: less chance for username disclosure. */
+		peer = bogus_peer;
+		ref_peer(peer, "ref_peer: check_peer_ok: must ref bogus_peer so unreffing it does not fail");
 	}
 
 	if (!ast_apply_ha(peer->ha, addr)) {
@@ -16535,9 +16603,10 @@
 		unref_peer(peer, "unref_peer: check_peer_ok: from find_peer call, early return of AUTH_ACL_FAILED");
 		return AUTH_ACL_FAILED;
 	}
-	if (debug)
+	if (debug && peer != bogus_peer) {
 		ast_verbose("Found peer '%s' for '%s' from %s\n",
 			peer->name, of, ast_sockaddr_stringify(&p->recv));
+	}
 
 	/* XXX what about p->prefs = peer->prefs; ? */
 	/* Set Frame packetization */
@@ -16807,8 +16876,6 @@
 		} else {
 			res = AUTH_RTP_FAILED;
 		}
-	} else if (sip_cfg.alwaysauthreject) {
-		res = AUTH_FAKE_AUTH; /* reject with fake authorization request */
 	} else {
 		res = AUTH_SECRET_FAILED; /* we don't want any guests, authentication will fail */
 	}
@@ -17127,7 +17194,7 @@
 		return CLI_SHOWUSAGE;
 	}
 
-	ast_cli(a->fd, FORMAT, "Username", "Secret", "Accountcode", "Def.Context", "ACL", "ForcerPort");
+	ast_cli(a->fd, FORMAT, "Username", "Secret", "Accountcode", "Def.Context", "ACL", "Forcerport");
 
 	user_iter = ao2_iterator_init(peers, 0);
 	while ((user = ao2_t_iterator_next(&user_iter, "iterate thru peers table"))) {
@@ -17263,44 +17330,56 @@
 	return strcmp((*ap)->name, (*bp)->name);
 }
 
+/* the last argument is left-aligned, so we don't need a size anyways */
+#define PEERS_FORMAT2 "%-25.25s %-39.39s %-3.3s %-10.10s %-3.3s %-8s %-10s %s\n"
+
+/*! \brief Used in the sip_show_peers functions to pass parameters */
+struct show_peers_context {
+	regex_t regexbuf;
+	int havepattern;
+	char idtext[256];
+	int realtimepeers;
+	int peers_mon_online;
+	int peers_mon_offline;
+	int peers_unmon_offline;
+	int peers_unmon_online;
+};
 
 /*! \brief Execute sip show peers command */
 static char *_sip_show_peers(int fd, int *total, struct mansession *s, const struct message *m, int argc, const char *argv[])
 {
-	regex_t regexbuf;
-	int havepattern = FALSE;
+	struct show_peers_context cont = {
+		.havepattern = FALSE,
+		.idtext = "",
+
+		.peers_mon_online = 0,
+		.peers_mon_offline = 0,
+		.peers_unmon_online = 0,
+		.peers_unmon_offline = 0,
+	};
 	struct sip_peer *peer;

[... 2185 lines stripped ...]



More information about the svn-commits mailing list