[asterisk-commits] russell: branch group/sip-tcptls r92756 - in /team/group/sip-tcptls: ./ apps/...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Dec 13 10:15:24 CST 2007


Author: russell
Date: Thu Dec 13 10:15:24 2007
New Revision: 92756

URL: http://svn.digium.com/view/asterisk?view=rev&rev=92756
Log:
resolve, reset

Modified:
    team/group/sip-tcptls/   (props changed)
    team/group/sip-tcptls/apps/app_voicemail.c
    team/group/sip-tcptls/channels/chan_h323.c
    team/group/sip-tcptls/channels/chan_sip.c
    team/group/sip-tcptls/main/config.c

Propchange: team/group/sip-tcptls/
------------------------------------------------------------------------------
    automerge = *

Propchange: team/group/sip-tcptls/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Propchange: team/group/sip-tcptls/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Dec 13 10:15:24 2007
@@ -1,1 +1,1 @@
-/trunk:1-92681
+/trunk:1-92755

Modified: team/group/sip-tcptls/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/group/sip-tcptls/apps/app_voicemail.c?view=diff&rev=92756&r1=92755&r2=92756
==============================================================================
--- team/group/sip-tcptls/apps/app_voicemail.c (original)
+++ team/group/sip-tcptls/apps/app_voicemail.c Thu Dec 13 10:15:24 2007
@@ -2218,9 +2218,9 @@
 	struct ast_tm tm;
 	struct timeval t = ast_tvnow();
 	
-	ast_localtime(&t, &tm, NULL);
-
-	return ast_strftime(s, len, "%a %b %e %r %Z %Y", &tm);
+	ast_localtime(&t, &tm, "UTC");
+
+	return ast_strftime(s, len, "%a %b %e %r UTC %Y", &tm);
 }
 
 static int invent_message(struct ast_channel *chan, char *context, char *ext, int busy, char *ecodes)

Modified: team/group/sip-tcptls/channels/chan_h323.c
URL: http://svn.digium.com/view/asterisk/team/group/sip-tcptls/channels/chan_h323.c?view=diff&rev=92756&r1=92755&r2=92756
==============================================================================
--- team/group/sip-tcptls/channels/chan_h323.c (original)
+++ team/group/sip-tcptls/channels/chan_h323.c Thu Dec 13 10:15:24 2007
@@ -2746,6 +2746,56 @@
 	AST_CLI_DEFINE(handle_cli_h323_show_tokens, "Show all active call tokens"),
 };
 
+static void delete_users(void)
+{
+	int pruned = 0;
+
+	/* Delete all users */
+	ASTOBJ_CONTAINER_WRLOCK(&userl);
+	ASTOBJ_CONTAINER_TRAVERSE(&userl, 1, do {
+		ASTOBJ_RDLOCK(iterator);
+		ASTOBJ_MARK(iterator);
+		++pruned;
+		ASTOBJ_UNLOCK(iterator);
+	} while (0) );
+	if (pruned) {
+		ASTOBJ_CONTAINER_PRUNE_MARKED(&userl, oh323_destroy_user);
+	}
+	ASTOBJ_CONTAINER_UNLOCK(&userl);
+
+	ASTOBJ_CONTAINER_WRLOCK(&peerl);
+	ASTOBJ_CONTAINER_TRAVERSE(&peerl, 1, do {
+		ASTOBJ_RDLOCK(iterator);
+		ASTOBJ_MARK(iterator);
+		ASTOBJ_UNLOCK(iterator);
+	} while (0) );
+	ASTOBJ_CONTAINER_UNLOCK(&peerl);
+}
+
+static void delete_aliases(void)
+{
+	int pruned = 0;
+
+	/* Delete all aliases */
+	ASTOBJ_CONTAINER_WRLOCK(&aliasl);
+	ASTOBJ_CONTAINER_TRAVERSE(&aliasl, 1, do {
+		ASTOBJ_RDLOCK(iterator);
+		ASTOBJ_MARK(iterator);
+		++pruned;
+		ASTOBJ_UNLOCK(iterator);
+	} while (0) );
+	if (pruned) {
+		ASTOBJ_CONTAINER_PRUNE_MARKED(&aliasl, oh323_destroy_alias);
+	}
+	ASTOBJ_CONTAINER_UNLOCK(&aliasl);
+}
+
+static void prune_peers(void)
+{
+	/* Prune peers who still are supposed to be deleted */
+	ASTOBJ_CONTAINER_PRUNE_MARKED(&peerl, oh323_destroy_peer);
+}
+
 static int reload_config(int is_reload)
 {
 	struct ast_config *cfg, *ucfg;
@@ -2973,56 +3023,6 @@
 	return 0;
 }
 
-static void delete_users(void)
-{
-	int pruned = 0;
-
-	/* Delete all users */
-	ASTOBJ_CONTAINER_WRLOCK(&userl);
-	ASTOBJ_CONTAINER_TRAVERSE(&userl, 1, do {
-		ASTOBJ_RDLOCK(iterator);
-		ASTOBJ_MARK(iterator);
-		++pruned;
-		ASTOBJ_UNLOCK(iterator);
-	} while (0) );
-	if (pruned) {
-		ASTOBJ_CONTAINER_PRUNE_MARKED(&userl, oh323_destroy_user);
-	}
-	ASTOBJ_CONTAINER_UNLOCK(&userl);
-
-	ASTOBJ_CONTAINER_WRLOCK(&peerl);
-	ASTOBJ_CONTAINER_TRAVERSE(&peerl, 1, do {
-		ASTOBJ_RDLOCK(iterator);
-		ASTOBJ_MARK(iterator);
-		ASTOBJ_UNLOCK(iterator);
-	} while (0) );
-	ASTOBJ_CONTAINER_UNLOCK(&peerl);
-}
-
-static void delete_aliases(void)
-{
-	int pruned = 0;
-
-	/* Delete all aliases */
-	ASTOBJ_CONTAINER_WRLOCK(&aliasl);
-	ASTOBJ_CONTAINER_TRAVERSE(&aliasl, 1, do {
-		ASTOBJ_RDLOCK(iterator);
-		ASTOBJ_MARK(iterator);
-		++pruned;
-		ASTOBJ_UNLOCK(iterator);
-	} while (0) );
-	if (pruned) {
-		ASTOBJ_CONTAINER_PRUNE_MARKED(&aliasl, oh323_destroy_alias);
-	}
-	ASTOBJ_CONTAINER_UNLOCK(&aliasl);
-}
-
-static void prune_peers(void)
-{
-	/* Prune peers who still are supposed to be deleted */
-	ASTOBJ_CONTAINER_PRUNE_MARKED(&peerl, oh323_destroy_peer);
-}
-
 static int h323_reload(void)
 {
 	ast_mutex_lock(&h323_reload_lock);

Modified: team/group/sip-tcptls/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/group/sip-tcptls/channels/chan_sip.c?view=diff&rev=92756&r1=92755&r2=92756
==============================================================================
--- team/group/sip-tcptls/channels/chan_sip.c (original)
+++ team/group/sip-tcptls/channels/chan_sip.c Thu Dec 13 10:15:24 2007
@@ -18683,6 +18683,36 @@
 	default_tls_cfg.cafile = ast_strdup("");
 	default_tls_cfg.capath = ast_strdup("");
 	
+	if (option_debug > 3)
+		ast_log(LOG_DEBUG, "--------------- SIP reload started\n");
+
+	clear_realm_authentication(authl);
+	clear_sip_domains();
+	authl = NULL;
+
+	/* First, destroy all outstanding registry calls */
+	/* This is needed, since otherwise active registry entries will not be destroyed */
+	ASTOBJ_CONTAINER_TRAVERSE(&regl, 1, do {
+		ASTOBJ_RDLOCK(iterator);
+		if (iterator->call) {
+			if (option_debug > 2)
+				ast_log(LOG_DEBUG, "Destroying active SIP dialog for registry %s@%s\n", iterator->username, iterator->hostname);
+			/* This will also remove references to the registry */
+			sip_destroy(iterator->call);
+		}
+		ASTOBJ_UNLOCK(iterator);
+	
+	} while(0));
+
+	/* Then, actually destroy users and registry */
+	ASTOBJ_CONTAINER_DESTROYALL(&userl, sip_destroy_user);
+	if (option_debug > 3)
+		ast_log(LOG_DEBUG, "--------------- Done destroying user list\n");
+	ASTOBJ_CONTAINER_DESTROYALL(&regl, sip_registry_destroy);
+	if (option_debug > 3)
+		ast_log(LOG_DEBUG, "--------------- Done destroying registry list\n");
+	ASTOBJ_CONTAINER_MARKALL(&peerl);
+
 	/* Initialize copy of current global_regcontext for later use in removing stale contexts */
 	ast_copy_string(oldcontexts, global_regcontext, sizeof(oldcontexts));
 	oldregcontext = oldcontexts;

Modified: team/group/sip-tcptls/main/config.c
URL: http://svn.digium.com/view/asterisk/team/group/sip-tcptls/main/config.c?view=diff&rev=92756&r1=92755&r2=92756
==============================================================================
--- team/group/sip-tcptls/main/config.c (original)
+++ team/group/sip-tcptls/main/config.c Thu Dec 13 10:15:24 2007
@@ -1008,7 +1008,7 @@
 				if (!ast_strlen_zero(exec_file))
 					unlink(exec_file);
 				if (!do_include)
-					return 0;
+					return -1;
 				/* XXX otherwise what ? the default return is 0 anyways */
 
 	} else {




More information about the asterisk-commits mailing list