[asterisk-commits] branch oej/test-this-branch r14465 - in
/team/oej/test-this-branch: ./ apps/ ...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Thu Mar 23 13:19:48 MST 2006
Author: oej
Date: Thu Mar 23 14:19:44 2006
New Revision: 14465
URL: http://svn.digium.com/view/asterisk?rev=14465&view=rev
Log:
Resolve, reset, go!
Modified:
team/oej/test-this-branch/ (props changed)
team/oej/test-this-branch/apps/app_readfile.c
team/oej/test-this-branch/channels/chan_sip.c
Propchange: team/oej/test-this-branch/
------------------------------------------------------------------------------
automerge = http://edvina.net/training/
Propchange: team/oej/test-this-branch/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.
Propchange: team/oej/test-this-branch/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Mar 23 14:19:44 2006
@@ -1,1 +1,1 @@
-/trunk:1-14406
+/trunk:1-14463
Modified: team/oej/test-this-branch/apps/app_readfile.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_readfile.c?rev=14465&r1=14464&r2=14465&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_readfile.c (original)
+++ team/oej/test-this-branch/apps/app_readfile.c Thu Mar 23 14:19: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/test-this-branch/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/channels/chan_sip.c?rev=14465&r1=14464&r2=14465&view=diff
==============================================================================
--- team/oej/test-this-branch/channels/chan_sip.c (original)
+++ team/oej/test-this-branch/channels/chan_sip.c Thu Mar 23 14:19:44 2006
@@ -8342,8 +8342,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];
@@ -8352,6 +8352,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");
@@ -8374,7 +8377,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" : ""));
}
@@ -8416,7 +8419,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,
@@ -8425,7 +8429,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,
@@ -8442,7 +8447,8 @@
"T38pt_support_rtp: %s\r\n"
"T38pt_support_tcp: %s\r\n"
"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-",
@@ -8454,7 +8460,8 @@
ast_test_flag((&iterator->flags_page2), SIP_PAGE2_T38SUPPORT_RTP) ? "yes" : "no", /* T.38 RTP Support */
ast_test_flag((&iterator->flags_page2), SIP_PAGE2_T38SUPPORT_TCP) ? "yes" : "no", /* T.38 TCP Support */
iterator->ha ? "yes" : "no", /* permit/deny */
- status);
+ status,
+ realtimepeers ? (ast_test_flag(iterator, SIP_REALTIME) ? "yes":"no") : "no");
}
ASTOBJ_UNLOCK(iterator);
@@ -8779,6 +8786,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;
@@ -8797,6 +8807,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;
@@ -9060,8 +9073,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