[asterisk-commits] branch oej/t38passthrough r14464 - in /team/oej/t38passthrough: ./ apps/ chan...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Mar 23 13:18:47 MST 2006


Author: oej
Date: Thu Mar 23 14:18:44 2006
New Revision: 14464

URL: http://svn.digium.com/view/asterisk?rev=14464&view=rev
Log:
Reset automerge after conflict

Modified:
    team/oej/t38passthrough/   (props changed)
    team/oej/t38passthrough/apps/app_readfile.c
    team/oej/t38passthrough/channels/chan_sip.c

Propchange: team/oej/t38passthrough/
------------------------------------------------------------------------------
    automerge = http://edvina.net/training/

Propchange: team/oej/t38passthrough/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Propchange: team/oej/t38passthrough/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Mar 23 14:18:44 2006
@@ -1,1 +1,1 @@
-/trunk:1-14405
+/trunk:1-14463

Modified: team/oej/t38passthrough/apps/app_readfile.c
URL: http://svn.digium.com/view/asterisk/team/oej/t38passthrough/apps/app_readfile.c?rev=14464&r1=14463&r2=14464&view=diff
==============================================================================
--- team/oej/t38passthrough/apps/app_readfile.c (original)
+++ team/oej/t38passthrough/apps/app_readfile.c Thu Mar 23 14:18:44 2006
@@ -92,15 +92,16 @@
 		}
 	}
 
-	returnvar = ast_read_textfile(file);
-	if(len > 0){
-		if(len < strlen(returnvar))
-			returnvar[len]='\0';
-		else
-			ast_log(LOG_WARNING,"%s is longer than %d, and %d \n", file, len, (int)strlen(returnvar));
+	if ((returnvar = ast_read_textfile(file))) {
+		if (len > 0) {
+			if (len < strlen(returnvar))
+				returnvar[len]='\0';
+			else
+				ast_log(LOG_WARNING, "%s is longer than %d, and %d \n", file, len, (int)strlen(returnvar));
+		}
+		pbx_builtin_setvar_helper(chan, varname, returnvar);
+		free(returnvar);
 	}
-	pbx_builtin_setvar_helper(chan, varname, returnvar);
-	free(returnvar);
 	LOCAL_USER_REMOVE(u);
 	return res;
 }

Modified: team/oej/t38passthrough/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/t38passthrough/channels/chan_sip.c?rev=14464&r1=14463&r2=14464&view=diff
==============================================================================
--- team/oej/t38passthrough/channels/chan_sip.c (original)
+++ team/oej/t38passthrough/channels/chan_sip.c Thu Mar 23 14:18:44 2006
@@ -8223,8 +8223,8 @@
 	regex_t regexbuf;
 	int havepattern = FALSE;
 
-#define FORMAT2 "%-25.25s  %-15.15s %-3.3s %-3.3s %-3.3s %-8s %-10s\n"
-#define FORMAT  "%-25.25s  %-15.15s %-3.3s %-3.3s %-3.3s %-8d %-10s\n"
+#define FORMAT2 "%-25.25s  %-15.15s %-3.3s %-3.3s %-3.3s %-8s %-10s %-10s\n"
+#define FORMAT  "%-25.25s  %-15.15s %-3.3s %-3.3s %-3.3s %-8d %-10s %-10s\n"
 
 	char name[256];
 	char iabuf[INET_ADDRSTRLEN];
@@ -8233,6 +8233,9 @@
 	int peers_offline = 0;
 	char *id;
 	char idtext[256] = "";
+	int realtimepeers;
+
+	realtimepeers = ast_check_realtime("sippeers");
 
 	if (s) {	/* Manager - get ActionID */
 		id = astman_get_header(m,"ActionID");
@@ -8255,7 +8258,7 @@
 	}
 
 	if (!s) { /* Normal list */
-		ast_cli(fd, FORMAT2, "Name/username", "Host", "Dyn", "Nat", "ACL", "Port", "Status");
+		ast_cli(fd, FORMAT2, "Name/username", "Host", "Dyn", "Nat", "ACL", "Port", "Status", (realtimepeers ? "Realtime" : ""));
 	} 
 	
 #define T38FMT	"T38pt_support_udptl: %s\r\n" \
@@ -8303,7 +8306,8 @@
 			ast_test_flag((&iterator->flags_page2), SIP_PAGE2_DYNAMIC) ? " D " : "   ", 	/* Dynamic or not? */
 			(ast_test_flag(iterator, SIP_NAT) & SIP_NAT_ROUTE) ? " N " : "   ",	/* NAT=yes? */
 			iterator->ha ? " A " : "   ", 	/* permit/deny */
-			ntohs(iterator->addr.sin_port), status);
+			ntohs(iterator->addr.sin_port), status,
+			realtimepeers ? (ast_test_flag(iterator, SIP_REALTIME) ? "Cached RT":"") : "");
 
 		if (!s)  {/* Normal CLI list */
 			ast_cli(fd, FORMAT, name, 
@@ -8312,7 +8316,8 @@
 			(ast_test_flag(iterator, SIP_NAT) & SIP_NAT_ROUTE) ? " N " : "   ",	/* NAT=yes? */
 			iterator->ha ? " A " : "   ",       /* permit/deny */
 			
-			ntohs(iterator->addr.sin_port), status);
+			ntohs(iterator->addr.sin_port), status,
+			realtimepeers ? (ast_test_flag(iterator, SIP_REALTIME) ? "Cached RT":"") : "");
 		} else {	/* Manager format */
 			/* The names here need to be the same as other channels */
 			ast_cli(fd, 
@@ -8326,7 +8331,8 @@
 			"Natsupport: %s\r\n"
 			T38FMT
 			"ACL: %s\r\n"
-			"Status: %s\r\n\r\n", 
+			"Status: %s\r\n"
+			"RealtimeDevice: %s\r\n\r\n", 
 			idtext,
 			iterator->name, 
 			iterator->addr.sin_addr.s_addr ? ast_inet_ntoa(iabuf, sizeof(iabuf), iterator->addr.sin_addr) : "-none-",
@@ -8335,7 +8341,8 @@
 			(ast_test_flag(iterator, SIP_NAT) & SIP_NAT_ROUTE) ? "yes" : "no",	/* NAT=yes? */
 			T38ARGS
 			iterator->ha ? "yes" : "no",       /* permit/deny */
-			status);
+			status,
+			realtimepeers ? (ast_test_flag(iterator, SIP_REALTIME) ? "yes":"no") : "no");
 		}
 
 		ASTOBJ_UNLOCK(iterator);
@@ -8661,6 +8668,9 @@
 	struct ast_variable *v;
 	struct sip_auth *auth;
 	int x = 0, codec = 0, load_realtime;
+	int realtimepeers;
+
+	realtimepeers = ast_check_realtime("sippeers");
 
 	if (argc < 4)
 		return RESULT_SHOWUSAGE;
@@ -8679,6 +8689,9 @@
 	if (peer && type==0 ) { /* Normal listing */
 		ast_cli(fd,"\n\n");
 		ast_cli(fd, "  * Name       : %s\n", peer->name);
+		if (realtimepeers) {	/* Realtime is enabled */
+			ast_cli(fd, "  Realtime peer: %s\n", ast_test_flag(peer, SIP_REALTIME) ? "Yes, cached" : "No");
+		}
 		ast_cli(fd, "  Secret       : %s\n", ast_strlen_zero(peer->secret)?"<Not set>":"<Set>");
 		ast_cli(fd, "  MD5Secret    : %s\n", ast_strlen_zero(peer->md5secret)?"<Not set>":"<Set>");
 		auth = peer->auth;
@@ -8935,8 +8948,8 @@
 static int sip_show_settings(int fd, int argc, char *argv[])
 {
 	char tmp[BUFSIZ];
-	int realtimepeers = 0;
-	int realtimeusers = 0;
+	int realtimepeers;
+	int realtimeusers;
 
 	realtimepeers = ast_check_realtime("sippeers");
 	realtimeusers = ast_check_realtime("sipusers");



More information about the asterisk-commits mailing list