[asterisk-commits] qwell: trunk r85764 - in /trunk: ./ channels/ configs/ doc/tex/ main/ pbx/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Oct 15 18:20:40 CDT 2007


Author: qwell
Date: Mon Oct 15 18:20:40 2007
New Revision: 85764

URL: http://svn.digium.com/view/asterisk?view=rev&rev=85764
Log:
Switch dundi to new tos config format.
Remove old unused defines for old style.

Closes issue 10860, patch by IgorG.

Modified:
    trunk/UPGRADE.txt
    trunk/channels/chan_h323.c
    trunk/channels/chan_iax2.c
    trunk/channels/chan_mgcp.c
    trunk/channels/chan_sip.c
    trunk/channels/iax2-provision.c
    trunk/configs/dundi.conf.sample
    trunk/doc/tex/qos.tex
    trunk/main/acl.c
    trunk/pbx/pbx_dundi.c

Modified: trunk/UPGRADE.txt
URL: http://svn.digium.com/view/asterisk/trunk/UPGRADE.txt?view=diff&rev=85764&r1=85763&r2=85764
==============================================================================
--- trunk/UPGRADE.txt (original)
+++ trunk/UPGRADE.txt Mon Oct 15 18:20:40 2007
@@ -1,11 +1,5 @@
 Information for Upgrading From Previous Asterisk Releases
 =========================================================
-
-Manager:
-
-* The CallerID fields across Manager events have now been made more
-  consistent. CallerID Number will be sent as CallerIDNum and CallerID
-  Name will be sent as CallerIDName wherever used.
 
 AEL:
 
@@ -113,7 +107,17 @@
   semicolon, in order to make the Local channel driver compatible with the comma
   delimiter change in applications.
 
+Configuration:
+
+* pbx_dundi.c: tos parameter changed to use new values. Old values like lowdelay,
+  lowcost and other is not acceptable now. Look into qos.tex for description of 
+  this parameter.
+
 Manager:
+
+* The CallerID fields across Manager events have now been made more
+  consistent. CallerID Number will be sent as CallerIDNum and CallerID
+  Name will be sent as CallerIDName wherever used.
 
 * The IAXpeers command output has been changed to more closely resemble the
   output of the SIPpeers command.

Modified: trunk/channels/chan_h323.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_h323.c?view=diff&rev=85764&r1=85763&r2=85764
==============================================================================
--- trunk/channels/chan_h323.c (original)
+++ trunk/channels/chan_h323.c Mon Oct 15 18:20:40 2007
@@ -54,11 +54,6 @@
 #include <sys/socket.h>
 #include <sys/signal.h>
 #include <sys/param.h>
-#if defined(BSD)
-#ifndef IPTOS_MINCOST
-#define IPTOS_MINCOST 0x02
-#endif
-#endif
 #include <arpa/inet.h>
 #include <net/if.h>
 #include <netinet/in.h>

Modified: trunk/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_iax2.c?view=diff&rev=85764&r1=85763&r2=85764
==============================================================================
--- trunk/channels/chan_iax2.c (original)
+++ trunk/channels/chan_iax2.c Mon Oct 15 18:20:40 2007
@@ -108,9 +108,6 @@
    thread is actually doing. */
 #define DEBUG_SCHED_MULTITHREAD
 
-#ifndef IPTOS_MINCOST
-#define IPTOS_MINCOST 0x02
-#endif
 
 #ifdef SO_NO_CHECK
 static int nochecksums = 0;

Modified: trunk/channels/chan_mgcp.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_mgcp.c?view=diff&rev=85764&r1=85763&r2=85764
==============================================================================
--- trunk/channels/chan_mgcp.c (original)
+++ trunk/channels/chan_mgcp.c Mon Oct 15 18:20:40 2007
@@ -78,10 +78,6 @@
 #include "asterisk/stringfields.h"
 #include "asterisk/abstract_jb.h"
 #include "asterisk/event.h"
-
-#ifndef IPTOS_MINCOST
-#define IPTOS_MINCOST 0x02
-#endif
 
 /*
  * Define to work around buggy dlink MGCP phone firmware which

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=85764&r1=85763&r2=85764
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Mon Oct 15 18:20:40 2007
@@ -156,9 +156,6 @@
 #define XMIT_ERROR		-2
 
 #define VIDEO_CODEC_MASK        0x1fc0000 /*!< Video codecs from H.261 thru AST_FORMAT_MAX_VIDEO */
-#ifndef IPTOS_MINCOST
-#define IPTOS_MINCOST           0x02
-#endif
 
 /* #define VOCAL_DATA_HACK */
 

Modified: trunk/channels/iax2-provision.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/iax2-provision.c?view=diff&rev=85764&r1=85763&r2=85764
==============================================================================
--- trunk/channels/iax2-provision.c (original)
+++ trunk/channels/iax2-provision.c Mon Oct 15 18:20:40 2007
@@ -50,10 +50,6 @@
 #include "iax2.h"
 #include "iax2-provision.h"
 #include "iax2-parser.h"
-
-#ifndef IPTOS_MINCOST
-#define IPTOS_MINCOST 0x02
-#endif
 
 static int provinit = 0;
 

Modified: trunk/configs/dundi.conf.sample
URL: http://svn.digium.com/view/asterisk/trunk/configs/dundi.conf.sample?view=diff&rev=85764&r1=85763&r2=85764
==============================================================================
--- trunk/configs/dundi.conf.sample (original)
+++ trunk/configs/dundi.conf.sample Mon Oct 15 18:20:40 2007
@@ -26,6 +26,9 @@
 ;
 ;bindaddr=0.0.0.0
 ;port=4520
+;
+; See doc/qos.tex for a description of the tos parameter.
+;tos=ef
 ;
 ; Our entity identifier (Should generally be the MAC address of the
 ; machine it's running on.  Defaults to the first eth address, but you

Modified: trunk/doc/tex/qos.tex
URL: http://svn.digium.com/view/asterisk/trunk/doc/tex/qos.tex?view=diff&rev=85764&r1=85763&r2=85764
==============================================================================
--- trunk/doc/tex/qos.tex (original)
+++ trunk/doc/tex/qos.tex Mon Oct 15 18:20:40 2007
@@ -53,9 +53,7 @@
 The tos* parameters also take numeric values.
 
 The lowdelay, throughput, reliability, mincost, and none values are
-deprecated because they set the IP TOS using the outdated "IP
-precedence" model as defined in RFC 791 and RFC 1349. They still
-work in this version of Asterisk, but will be removed in future releases.
+removed in current releases.
 
 \subsubsection{802.1p CoS values}
 

Modified: trunk/main/acl.c
URL: http://svn.digium.com/view/asterisk/trunk/main/acl.c?view=diff&rev=85764&r1=85763&r2=85764
==============================================================================
--- trunk/main/acl.c (original)
+++ trunk/main/acl.c Mon Oct 15 18:20:40 2007
@@ -51,15 +51,6 @@
 
 #if defined(SOLARIS)
 #include <sys/sockio.h>
-#endif
-
-/* netinet/ip.h may not define the following (See RFCs 791 and 1349) */
-#if !defined(IPTOS_LOWCOST)
-#define       IPTOS_LOWCOST           0x02
-#endif
-
-#if !defined(IPTOS_MINCOST)
-#define       IPTOS_MINCOST           IPTOS_LOWCOST
 #endif
 
 #include "asterisk/acl.h"

Modified: trunk/pbx/pbx_dundi.c
URL: http://svn.digium.com/view/asterisk/trunk/pbx/pbx_dundi.c?view=diff&rev=85764&r1=85763&r2=85764
==============================================================================
--- trunk/pbx/pbx_dundi.c (original)
+++ trunk/pbx/pbx_dundi.c Mon Oct 15 18:20:40 2007
@@ -115,7 +115,7 @@
 static int netsocket = -1;
 static pthread_t netthreadid = AST_PTHREADT_NULL;
 static pthread_t precachethreadid = AST_PTHREADT_NULL;
-static int tos = 0;
+static unsigned int tos = 0;
 static int dundidebug = 0;
 static int authdebug = 0;
 static int dundi_ttl = DUNDI_DEFAULT_TTL;
@@ -4661,7 +4661,6 @@
 	struct ast_config *cfg;
 	struct ast_variable *v;
 	char *cat;
-	int format;
 	int x;
 	struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
 	char hn[MAXHOSTNAMELEN] = "";
@@ -4738,26 +4737,8 @@
 			else
 				ast_log(LOG_WARNING, "Invalid global endpoint identifier '%s' at line %d\n", v->value, v->lineno);
 		} else if (!strcasecmp(v->name, "tos")) {
-			if (sscanf(v->value, "%d", &format) == 1)
-				tos = format & 0xff;
-			else if (!strcasecmp(v->value, "lowdelay"))
-				tos = IPTOS_LOWDELAY;
-			else if (!strcasecmp(v->value, "throughput"))
-				tos = IPTOS_THROUGHPUT;
-			else if (!strcasecmp(v->value, "reliability"))
-				tos = IPTOS_RELIABILITY;
-#if !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(SOLARIS)
-			else if (!strcasecmp(v->value, "mincost"))
-				tos = IPTOS_MINCOST;
-#endif
-			else if (!strcasecmp(v->value, "none"))
-				tos = 0;
-			else
-#if !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(SOLARIS)
-				ast_log(LOG_WARNING, "Invalid tos value at line %d, should be 'lowdelay', 'throughput', 'reliability', 'mincost', or 'none'\n", v->lineno);
-#else
-				ast_log(LOG_WARNING, "Invalid tos value at line %d, should be 'lowdelay', 'throughput', 'reliability', or 'none'\n", v->lineno);
-#endif
+			if (ast_str2tos(v->value, &tos)) 
+				ast_log(LOG_WARNING, "Invalid tos value at line %d, please read docs/qos.tex\n", v->lineno);
 		} else if (!strcasecmp(v->name, "department")) {
 			ast_copy_string(dept, v->value, sizeof(dept));
 		} else if (!strcasecmp(v->name, "organization")) {




More information about the asterisk-commits mailing list