[asterisk-commits] seanbright: trunk r356882 - in /trunk: channels/ include/asterisk/ main/ pbx/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Feb 27 08:14:02 CST 2012


Author: seanbright
Date: Mon Feb 27 08:13:58 2012
New Revision: 356882

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=356882
Log:
Prefer ast_set_qos() over ast_netsock_set_qos()

Modified:
    trunk/channels/chan_mgcp.c
    trunk/channels/chan_skinny.c
    trunk/channels/chan_unistim.c
    trunk/include/asterisk/netsock.h
    trunk/main/udptl.c
    trunk/pbx/pbx_dundi.c

Modified: trunk/channels/chan_mgcp.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_mgcp.c?view=diff&rev=356882&r1=356881&r2=356882
==============================================================================
--- trunk/channels/chan_mgcp.c (original)
+++ trunk/channels/chan_mgcp.c Mon Feb 27 08:13:58 2012
@@ -69,7 +69,7 @@
 #include "asterisk/app.h"
 #include "asterisk/musiconhold.h"
 #include "asterisk/utils.h"
-#include "asterisk/netsock.h"
+#include "asterisk/netsock2.h"
 #include "asterisk/causes.h"
 #include "asterisk/dsp.h"
 #include "asterisk/devicestate.h"
@@ -4775,7 +4775,7 @@
 		} else {
 			ast_verb(2, "MGCP Listening on %s:%d\n",
 					ast_inet_ntoa(bindaddr.sin_addr), ntohs(bindaddr.sin_port));
-			ast_netsock_set_qos(mgcpsock, qos.tos, qos.cos, "MGCP");
+			ast_set_qos(mgcpsock, qos.tos, qos.cos, "MGCP");
 		}
 	}
 	ast_mutex_unlock(&netlock);

Modified: trunk/channels/chan_skinny.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_skinny.c?view=diff&rev=356882&r1=356881&r2=356882
==============================================================================
--- trunk/channels/chan_skinny.c (original)
+++ trunk/channels/chan_skinny.c Mon Feb 27 08:13:58 2012
@@ -53,7 +53,7 @@
 #include "asterisk/sched.h"
 #include "asterisk/io.h"
 #include "asterisk/rtp_engine.h"
-#include "asterisk/netsock.h"
+#include "asterisk/netsock2.h"
 #include "asterisk/acl.h"
 #include "asterisk/callerid.h"
 #include "asterisk/cli.h"
@@ -7834,7 +7834,7 @@
 			}
 			ast_verb(2, "Skinny listening on %s:%d\n",
 					ast_inet_ntoa(bindaddr.sin_addr), ntohs(bindaddr.sin_port));
-			ast_netsock_set_qos(skinnysock, qos.tos, qos.cos, "Skinny");
+			ast_set_qos(skinnysock, qos.tos, qos.cos, "Skinny");
 			ast_pthread_create_background(&accept_t, NULL, accept_thread, NULL);
 		}
 	}

Modified: trunk/channels/chan_unistim.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_unistim.c?view=diff&rev=356882&r1=356881&r2=356882
==============================================================================
--- trunk/channels/chan_unistim.c (original)
+++ trunk/channels/chan_unistim.c Mon Feb 27 08:13:58 2012
@@ -65,7 +65,7 @@
 #include "asterisk/pbx.h"
 #include "asterisk/event.h"
 #include "asterisk/rtp_engine.h"
-#include "asterisk/netsock.h"
+#include "asterisk/netsock2.h"
 #include "asterisk/acl.h"
 #include "asterisk/callerid.h"
 #include "asterisk/cli.h"
@@ -5646,7 +5646,7 @@
 		unistimsock = -1;
 	} else {
 		ast_verb(2, "UNISTIM Listening on %s:%d\n", ast_inet_ntoa(bindaddr.sin_addr), htons(bindaddr.sin_port));
-		ast_netsock_set_qos(unistimsock, qos.tos, qos.cos, "UNISTIM");
+		ast_set_qos(unistimsock, qos.tos, qos.cos, "UNISTIM");
 	}
 	return 0;
 }

Modified: trunk/include/asterisk/netsock.h
URL: http://svnview.digium.com/svn/asterisk/trunk/include/asterisk/netsock.h?view=diff&rev=356882&r1=356881&r2=356882
==============================================================================
--- trunk/include/asterisk/netsock.h (original)
+++ trunk/include/asterisk/netsock.h Mon Feb 27 08:13:58 2012
@@ -50,6 +50,10 @@
 struct ast_netsock *ast_netsock_find(struct ast_netsock_list *list,
 				     struct sockaddr_in *sa);
 
+/*!
+ * \deprecated Use ast_seq_qos in netsock2.h which propertly handles IPv4 and IPv6
+ *             sockets, instead.
+ */
 int ast_netsock_set_qos(int netsocket, int tos, int cos, const char *desc);
 
 int ast_netsock_sockfd(const struct ast_netsock *ns);

Modified: trunk/main/udptl.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/udptl.c?view=diff&rev=356882&r1=356881&r2=356882
==============================================================================
--- trunk/main/udptl.c (original)
+++ trunk/main/udptl.c Mon Feb 27 08:13:58 2012
@@ -64,7 +64,7 @@
 #include "asterisk/config.h"
 #include "asterisk/lock.h"
 #include "asterisk/utils.h"
-#include "asterisk/netsock.h"
+#include "asterisk/netsock2.h"
 #include "asterisk/cli.h"
 #include "asterisk/unaligned.h"
 
@@ -1007,7 +1007,7 @@
 
 int ast_udptl_setqos(struct ast_udptl *udptl, unsigned int tos, unsigned int cos)
 {
-	return ast_netsock_set_qos(udptl->fd, tos, cos, "UDPTL");
+	return ast_set_qos(udptl->fd, tos, cos, "UDPTL");
 }
 
 void ast_udptl_set_peer(struct ast_udptl *udptl, const struct ast_sockaddr *them)

Modified: trunk/pbx/pbx_dundi.c
URL: http://svnview.digium.com/svn/asterisk/trunk/pbx/pbx_dundi.c?view=diff&rev=356882&r1=356881&r2=356882
==============================================================================
--- trunk/pbx/pbx_dundi.c (original)
+++ trunk/pbx/pbx_dundi.c Mon Feb 27 08:13:58 2012
@@ -58,7 +58,7 @@
 #include "asterisk/sched.h"
 #include "asterisk/io.h"
 #include "asterisk/utils.h"
-#include "asterisk/netsock.h"
+#include "asterisk/netsock2.h"
 #include "asterisk/crypto.h"
 #include "asterisk/astdb.h"
 #include "asterisk/acl.h"
@@ -4865,7 +4865,7 @@
 		return AST_MODULE_LOAD_DECLINE;
 	}
 
-	ast_netsock_set_qos(netsocket, tos, 0, "DUNDi");
+	ast_set_qos(netsocket, tos, 0, "DUNDi");
 
 	if (start_network_thread()) {
 		ast_log(LOG_ERROR, "Unable to start network thread\n");




More information about the asterisk-commits mailing list