[svn-commits] murf: branch murf/bug7433 r47589 - in /team/murf/bug7433: ./ apps/ cdr/ chann...

svn-commits at lists.digium.com svn-commits at lists.digium.com
Mon Nov 13 20:39:45 MST 2006


Author: murf
Date: Mon Nov 13 21:39:45 2006
New Revision: 47589

URL: http://svn.digium.com/view/asterisk?view=rev&rev=47589
Log:
updating against 1.4 branch

Modified:
    team/murf/bug7433/   (props changed)
    team/murf/bug7433/apps/app_sms.c
    team/murf/bug7433/cdr/cdr_pgsql.c
    team/murf/bug7433/channels/chan_sip.c
    team/murf/bug7433/main/cli.c
    team/murf/bug7433/main/config.c
    team/murf/bug7433/pbx/ael/ael-test/ref.ael-test3
    team/murf/bug7433/pbx/pbx_ael.c

Propchange: team/murf/bug7433/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Propchange: team/murf/bug7433/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Nov 13 21:39:45 2006
@@ -1,1 +1,1 @@
-/branches/1.4:1-47547
+/branches/1.4:1-47483

Modified: team/murf/bug7433/apps/app_sms.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug7433/apps/app_sms.c?view=diff&rev=47589&r1=47588&r2=47589
==============================================================================
--- team/murf/bug7433/apps/app_sms.c (original)
+++ team/murf/bug7433/apps/app_sms.c Mon Nov 13 21:39:45 2006
@@ -1046,7 +1046,7 @@
 		unsigned char p = 2;
 		h->omsg[0] = 0x91;		  /* SMS_DATA */
 		if (h->smsc) {			 /* deliver */
-			h->omsg[p++] = (more ? 4 : 0);
+			h->omsg[p++] = (more ? 4 : 0) + ((h->udhl > 0) ? 0x40 : 0);
 			p += packaddress (h->omsg + p, h->oa);
 			h->omsg[p++] = h->pid;
 			h->omsg[p++] = h->dcs;

Modified: team/murf/bug7433/cdr/cdr_pgsql.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug7433/cdr/cdr_pgsql.c?view=diff&rev=47589&r1=47588&r2=47589
==============================================================================
--- team/murf/bug7433/cdr/cdr_pgsql.c (original)
+++ team/murf/bug7433/cdr/cdr_pgsql.c Mon Nov 13 21:39:45 2006
@@ -66,8 +66,8 @@
 
 AST_MUTEX_DEFINE_STATIC(pgsql_lock);
 
-static PGconn	*conn;
-static PGresult	*result;
+static PGconn	*conn = NULL;
+static PGresult	*result = NULL;
 
 static int pgsql_log(struct ast_cdr *cdr)
 {

Modified: team/murf/bug7433/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug7433/channels/chan_sip.c?view=diff&rev=47589&r1=47588&r2=47589
==============================================================================
--- team/murf/bug7433/channels/chan_sip.c (original)
+++ team/murf/bug7433/channels/chan_sip.c Mon Nov 13 21:39:45 2006
@@ -9861,7 +9861,7 @@
 		print_group(fd, peer->pickupgroup, 0);
 		ast_cli(fd, "  Mailbox      : %s\n", peer->mailbox);
 		ast_cli(fd, "  VM Extension : %s\n", peer->vmexten);
-		ast_cli(fd, "  LastMsgsSent : %d\n", peer->lastmsgssent);
+		ast_cli(fd, "  LastMsgsSent : %d/%d\n", (peer->lastmsgssent & 0x7fff0000) >> 16, peer->lastmsgssent & 0xffff);
 		ast_cli(fd, "  Call limit   : %d\n", peer->call_limit);
 		ast_cli(fd, "  Dynamic      : %s\n", (ast_test_flag(&peer->flags[1], SIP_PAGE2_DYNAMIC)?"Yes":"No"));
 		ast_cli(fd, "  Callerid     : %s\n", ast_callerid_merge(cbuf, sizeof(cbuf), peer->cid_name, peer->cid_num, "<unspecified>"));
@@ -10532,7 +10532,7 @@
 {
 	int x = 0;
 	struct sip_history *hist;
-	static errmsg = 0;
+	static int errmsg = 0;
 
 	if (!dialog)
 		return;
@@ -10708,7 +10708,7 @@
 static int sip_do_debug(int fd, int argc, char *argv[])
 {
 	int oldsipdebug = sipdebug_console;
-	if (argc != 4) {
+	if (argc != 3) {
 		if (argc != 5) 
 			return RESULT_SHOWUSAGE;
 		else if (strcmp(argv[3], "ip") == 0)
@@ -10724,6 +10724,30 @@
 	return RESULT_SUCCESS;
 }
 
+static int sip_do_debug_deprecated(int fd, int argc, char *argv[])
+{
+	int oldsipdebug = sipdebug_console;
+	char *newargv[6] = { "sip", "set", "debug", NULL };
+	if (argc != 2) {
+		if (argc != 4) 
+			return RESULT_SHOWUSAGE;
+		else if (strcmp(argv[2], "ip") == 0) {
+			newargv[3] = argv[2];
+			newargv[4] = argv[3];
+			return sip_do_debug_ip(fd, argc + 1, newargv);
+		} else if (strcmp(argv[2], "peer") == 0) {
+			newargv[3] = argv[2];
+			newargv[4] = argv[3];
+			return sip_do_debug_peer(fd, argc + 1, newargv);
+		} else
+			return RESULT_SHOWUSAGE;
+	}
+	ast_set_flag(&global_flags[1], SIP_PAGE2_DEBUG_CONSOLE);
+	memset(&debugaddr, 0, sizeof(debugaddr));
+	ast_cli(fd, "SIP Debugging %senabled\n", oldsipdebug ? "re-" : "");
+	return RESULT_SUCCESS;
+}
+
 /*! \brief Cli command to send SIP notify to peer */
 static int sip_notify(int fd, int argc, char *argv[])
 {
@@ -10784,6 +10808,15 @@
 static int sip_no_debug(int fd, int argc, char *argv[])
 {
 	if (argc != 4)
+		return RESULT_SHOWUSAGE;
+	ast_clear_flag(&global_flags[1], SIP_PAGE2_DEBUG_CONSOLE);
+	ast_cli(fd, "SIP Debugging Disabled\n");
+	return RESULT_SUCCESS;
+}
+
+static int sip_no_debug_deprecated(int fd, int argc, char *argv[])
+{
+	if (argc != 3)
 		return RESULT_SHOWUSAGE;
 	ast_clear_flag(&global_flags[1], SIP_PAGE2_DEBUG_CONSOLE);
 	ast_cli(fd, "SIP Debugging Disabled\n");
@@ -11056,16 +11089,16 @@
 "       Lists all registration requests and status.\n";
 
 static char debug_usage[] = 
-"Usage: sip debug\n"
+"Usage: sip set debug\n"
 "       Enables dumping of SIP packets for debugging purposes\n\n"
-"       sip debug ip <host[:PORT]>\n"
+"       sip set debug ip <host[:PORT]>\n"
 "       Enables dumping of SIP packets to and from host.\n\n"
-"       sip debug peer <peername>\n"
+"       sip set debug peer <peername>\n"
 "       Enables dumping of SIP packets to and from host.\n"
 "       Require peer to be registered.\n";
 
 static char no_debug_usage[] = 
-"Usage: sip debug off\n"
+"Usage: sip set debug off\n"
 "       Disables dumping of SIP packets for debugging purposes\n";
 
 static char no_history_usage[] = 
@@ -13821,7 +13854,8 @@
 	int res;
 	struct ast_channel *bridged_to;
 	
-	if (p->pendinginvite && !ast_test_flag(&p->flags[0], SIP_OUTGOING) && !ast_test_flag(req, SIP_PKT_IGNORE))
+	/* If we have an INCOMING invite that we haven't answered, terminate that transaction */
+	if (p->pendinginvite && !ast_test_flag(&p->flags[0], SIP_OUTGOING) && !ast_test_flag(req, SIP_PKT_IGNORE) && !p->owner)
 		transmit_response_reliable(p, "487 Request Terminated", &p->initreq);
 
 	copy_request(&p->initreq, req);
@@ -14536,12 +14570,12 @@
 	peer->lastmsgcheck = time(NULL);
 	
 	/* Return now if it's the same thing we told them last time */
-	if (((newmsgs << 8) | (oldmsgs)) == peer->lastmsgssent) {
+	if (((newmsgs > 0x7fff ? 0x7fff0000 : (newmsgs << 16)) | (oldmsgs > 0xffff ? 0xffff : oldmsgs)) == peer->lastmsgssent) {
 		return 0;
 	}
 	
 	
-	peer->lastmsgssent = ((newmsgs << 8) | (oldmsgs));
+	peer->lastmsgssent = ((newmsgs > 0x7fff ? 0x7fff0000 : (newmsgs << 16)) | (oldmsgs > 0xffff ? 0xffff : oldmsgs));
 
 	if (peer->mwipvt) {
 		/* Base message on subscription */
@@ -16837,6 +16871,16 @@
 	return sip_reload(0, 0, NULL);
 }
 
+static struct ast_cli_entry cli_sip_debug_deprecated =
+	{ { "sip", "debug", NULL },
+	sip_do_debug_deprecated, "Enable SIP debugging",
+	debug_usage };
+
+static struct ast_cli_entry cli_sip_no_debug_deprecated =
+	{ { "sip", "no", "debug", NULL },
+	sip_no_debug_deprecated, "Disable SIP debugging",
+	debug_usage };
+
 static struct ast_cli_entry cli_sip[] = {
 	{ { "sip", "show", "channels", NULL },
 	sip_show_channels, "List active SIP channels",
@@ -16908,7 +16952,7 @@
 
 	{ { "sip", "set", "debug", NULL },
 	sip_do_debug, "Enable SIP debugging",
-	debug_usage },
+	debug_usage, NULL, &cli_sip_debug_deprecated },
 
 	{ { "sip", "set", "debug", "ip", NULL },
 	sip_do_debug, "Enable SIP debugging on IP",
@@ -16920,7 +16964,7 @@
 
 	{ { "sip", "set", "debug", "off", NULL },
 	sip_no_debug, "Disable SIP debugging",
-	no_debug_usage },
+	no_debug_usage, NULL, &cli_sip_no_debug_deprecated },
 
 	{ { "sip", "history", NULL },
 	sip_do_history, "Enable SIP history",

Modified: team/murf/bug7433/main/cli.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug7433/main/cli.c?view=diff&rev=47589&r1=47588&r2=47589
==============================================================================
--- team/murf/bug7433/main/cli.c (original)
+++ team/murf/bug7433/main/cli.c Mon Nov 13 21:39:45 2006
@@ -481,7 +481,7 @@
 }
 
 static char modlist_help[] =
-"Usage: core show modules [like keyword]\n"
+"Usage: module show [like <keyword>]\n"
 "       Shows Asterisk modules currently in use, and usage statistics.\n";
 
 static char uptime_help[] =

Modified: team/murf/bug7433/main/config.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug7433/main/config.c?view=diff&rev=47589&r1=47588&r2=47589
==============================================================================
--- team/murf/bug7433/main/config.c (original)
+++ team/murf/bug7433/main/config.c Mon Nov 13 21:39:45 2006
@@ -905,7 +905,7 @@
 							new_buf = comment_p + 1;
 					}
 				}
-				if( comment && !process_buf )
+				if( withcomments && comment && !process_buf )
 				{
 					CB_ADD(buf);  /* the whole line is a comment, store it */
 				}

Modified: team/murf/bug7433/pbx/ael/ael-test/ref.ael-test3
URL: http://svn.digium.com/view/asterisk/team/murf/bug7433/pbx/ael/ael-test/ref.ael-test3?view=diff&rev=47589&r1=47588&r2=47589
==============================================================================
--- team/murf/bug7433/pbx/ael/ael-test/ref.ael-test3 (original)
+++ team/murf/bug7433/pbx/ael/ael-test/ref.ael-test3 Mon Nov 13 21:39:45 2006
@@ -2,20 +2,17 @@
 (If you find progress and other non-error messages irritating, you can use -q to suppress them)
 
 (You can use the -w option to dump extensions.conf format to extensions.conf.aeldump)
-LOG: lev:2 file:pbx_ael.c  line:3856 func: pbx_load_module  Starting AEL load process.
-LOG: lev:2 file:pbx_ael.c  line:3863 func: pbx_load_module  AEL load process: calculated config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c  line:3859 func: pbx_load_module  Starting AEL load process.
+LOG: lev:2 file:pbx_ael.c  line:3866 func: pbx_load_module  AEL load process: calculated config file name './extensions.ael'.
 LOG: lev:2 file:ael.flex  line:429 func: ael_yylex    --Read in included file ./include1.ael2, 78 chars
 LOG: lev:2 file:ael.flex  line:429 func: ael_yylex    --Read in included file ./include2.ael2, 98 chars
 LOG: lev:2 file:ael.flex  line:429 func: ael_yylex    --Read in included file ./include3.ael2, 57 chars
 LOG: lev:2 file:ael.flex  line:429 func: ael_yylex    --Read in included file ./include5.ael2, 56 chars
 LOG: lev:2 file:ael.flex  line:429 func: ael_yylex    --Read in included file ./include4.ael2, 87 chars
 LOG: lev:2 file:ael.flex  line:429 func: ael_yylex    --Read in included file ./telemarket_torture.ael2, 28036 chars
-LOG: lev:2 file:pbx_ael.c  line:3871 func: pbx_load_module  AEL load process: parsed config file name './extensions.ael'.
-LOG: lev:3 file:pbx_ael.c  line:816 func: check_includes  Warning: file ./extensions.ael, line 2747-2751: The included context 'parkedcalls' cannot be found.
-LOG: lev:3 file:pbx_ael.c  line:816 func: check_includes  Warning: file ./extensions.ael, line 2954-2957: The included context 'parkedcalls' cannot be found.
-LOG: lev:3 file:pbx_ael.c  line:816 func: check_includes  Warning: file ./extensions.ael, line 3005-3012: The included context 'parkedcalls' cannot be found.
-LOG: lev:2 file:pbx_ael.c  line:3874 func: pbx_load_module  AEL load process: checked config file name './extensions.ael'.
-LOG: lev:2 file:pbx_ael.c  line:3876 func: pbx_load_module  AEL load process: compiled config file name './extensions.ael'.
-LOG: lev:2 file:pbx_ael.c  line:3879 func: pbx_load_module  AEL load process: merged config file name './extensions.ael'.
-LOG: lev:2 file:pbx_ael.c  line:3882 func: pbx_load_module  AEL load process: verified config file name './extensions.ael'.
-LOG: lev:4 file:ael2_parse  line:479 func: main  172 contexts, 858 extensions, 2326 priorities
+LOG: lev:2 file:pbx_ael.c  line:3874 func: pbx_load_module  AEL load process: parsed config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c  line:3877 func: pbx_load_module  AEL load process: checked config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c  line:3879 func: pbx_load_module  AEL load process: compiled config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c  line:3882 func: pbx_load_module  AEL load process: merged config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c  line:3885 func: pbx_load_module  AEL load process: verified config file name './extensions.ael'.
+LOG: lev:4 file:ael2_parse  line:483 func: main  172 contexts, 858 extensions, 2326 priorities

Modified: team/murf/bug7433/pbx/pbx_ael.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug7433/pbx/pbx_ael.c?view=diff&rev=47589&r1=47588&r2=47589
==============================================================================
--- team/murf/bug7433/pbx/pbx_ael.c (original)
+++ team/murf/bug7433/pbx/pbx_ael.c Mon Nov 13 21:39:45 2006
@@ -812,7 +812,7 @@
 		char *incl_context = p4->u1.str;
 		/* find a matching context name */
 		struct pval *that_other_context = find_context(incl_context);
-		if (!that_other_context) {
+		if (!that_other_context && strcmp(incl_context, "parkedcalls") != 0) {
 			ast_log(LOG_WARNING, "Warning: file %s, line %d-%d: The included context '%s' cannot be found.\n",
 					includes->filename, includes->startline, includes->endline, incl_context);
 			warns++;



More information about the svn-commits mailing list