[Pkg-voip-commits] r9570 - in /kamailio/trunk/debian/patches: series upstream/0004-core-added-back-the-option-to-use-name-IDs-for-tos-s.patch

maniac-guest at alioth.debian.org maniac-guest at alioth.debian.org
Mon Mar 5 07:26:49 UTC 2012


Author: maniac-guest
Date: Mon Mar  5 07:26:48 2012
New Revision: 9570

URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=9570
Log:
upstream bugfix

Added:
    kamailio/trunk/debian/patches/upstream/0004-core-added-back-the-option-to-use-name-IDs-for-tos-s.patch
Modified:
    kamailio/trunk/debian/patches/series

Modified: kamailio/trunk/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-voip/kamailio/trunk/debian/patches/series?rev=9570&op=diff
==============================================================================
--- kamailio/trunk/debian/patches/series (original)
+++ kamailio/trunk/debian/patches/series Mon Mar  5 07:26:48 2012
@@ -1,6 +1,7 @@
 upstream/0001-Proper-parsing-for-PVs.patch
 upstream/0002-xmlops-fixed-internal-module-name.patch
 upstream/0003-regex_mod-Fix-a-double-freeing-in-free_shared_memory.patch
+upstream/0004-core-added-back-the-option-to-use-name-IDs-for-tos-s.patch
 no_lib64_on_64_bits.patch
 no_INSTALL_file.patch
 spelling-errors.patch

Added: kamailio/trunk/debian/patches/upstream/0004-core-added-back-the-option-to-use-name-IDs-for-tos-s.patch
URL: http://svn.debian.org/wsvn/pkg-voip/kamailio/trunk/debian/patches/upstream/0004-core-added-back-the-option-to-use-name-IDs-for-tos-s.patch?rev=9570&op=file
==============================================================================
--- kamailio/trunk/debian/patches/upstream/0004-core-added-back-the-option-to-use-name-IDs-for-tos-s.patch (added)
+++ kamailio/trunk/debian/patches/upstream/0004-core-added-back-the-option-to-use-name-IDs-for-tos-s.patch Mon Mar  5 07:26:48 2012
@@ -1,0 +1,60 @@
+From 118a79b43e87a44184088a57ddc81c5e6411750e Mon Sep 17 00:00:00 2001
+From: Daniel-Constantin Mierla <miconda at gmail.com>
+Date: Sun, 4 Mar 2012 17:22:30 +0100
+Subject: [PATCH] core: added back the option to use name IDs for tos setting
+
+- reported by Olle E. Johansson
+(cherry picked from commit d3eb5d4f21f20a9bc5457642ad5fdcb9e764a02c)
+---
+ cfg.y |   28 ++++++++++++++++++++++++++++
+ 1 files changed, 28 insertions(+), 0 deletions(-)
+
+diff --git a/cfg.y b/cfg.y
+index 9317541..dae8fbf 100644
+--- a/cfg.y
++++ b/cfg.y
+@@ -111,6 +111,7 @@
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
++#include <netinet/ip.h>
+ #include <arpa/inet.h>
+ #include <string.h>
+ #include <errno.h>
+@@ -1598,6 +1599,33 @@ assign_stm:
+ 	}
+ 	| MCAST_TTL EQUAL error { yyerror("number expected"); }
+ 	| TOS EQUAL NUMBER { tos=$3; }
++	| TOS EQUAL ID { if (strcasecmp($3,"IPTOS_LOWDELAY")) {
++			tos=IPTOS_LOWDELAY;
++		} else if (strcasecmp($3,"IPTOS_THROUGHPUT")) {
++			tos=IPTOS_THROUGHPUT;
++		} else if (strcasecmp($3,"IPTOS_RELIABILITY")) {
++			tos=IPTOS_RELIABILITY;
++#if defined(IPTOS_MINCOST)
++		} else if (strcasecmp($3,"IPTOS_MINCOST")) {
++			tos=IPTOS_MINCOST;
++#endif
++#if defined(IPTOS_LOWCOST)
++		} else if (strcasecmp($3,"IPTOS_LOWCOST")) {
++			tos=IPTOS_LOWCOST;
++#endif
++		} else {
++			yyerror("invalid tos value - allowed: "
++				"IPTOS_LOWDELAY,IPTOS_THROUGHPUT,"
++				"IPTOS_RELIABILITY"
++#if defined(IPTOS_LOWCOST)
++				",IPTOS_LOWCOST"
++#endif
++#if !defined(IPTOS_MINCOST)
++				",IPTOS_MINCOST"
++#endif
++				"\n");
++		}
++	}
+ 	| TOS EQUAL error { yyerror("number expected"); }
+ 	| PMTU_DISCOVERY EQUAL NUMBER { pmtu_discovery=$3; }
+ 	| PMTU_DISCOVERY error { yyerror("number expected"); }
+-- 
+1.7.5.4
+




More information about the Pkg-voip-commits mailing list