Prefer ast_set_qos() over ast_netsock_set_qos()
authorSean Bright <sean@malleable.com>
Mon, 27 Feb 2012 14:13:58 +0000 (14:13 +0000)
committerSean Bright <sean@malleable.com>
Mon, 27 Feb 2012 14:13:58 +0000 (14:13 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356882 65c4cc65-6c06-0410-ace0-fbb531ad65f3

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

index 96c22d1..9a49d00 100644 (file)
@@ -69,7 +69,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 #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 @@ static int reload_config(int reload)
                } 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);
index 6fc1ebc..724493f 100644 (file)
@@ -53,7 +53,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 #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 @@ static struct ast_channel *skinny_request(const char *type, struct ast_format_ca
                        }
                        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);
                }
        }
index 3a7b370..f87e044 100644 (file)
@@ -65,7 +65,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 #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 @@ static int reload_config(void)
                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;
 }
index 494efcf..efb1955 100644 (file)
@@ -50,6 +50,10 @@ int ast_netsock_release(struct ast_netsock_list *list);
 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);
index 6502cbc..94c5365 100644 (file)
@@ -64,7 +64,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 #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 @@ void ast_udptl_set_tag(struct ast_udptl *udptl, const char *format, ...)
 
 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)
index 1a7f15c..ab48ad6 100644 (file)
@@ -58,7 +58,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 #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 @@ static int load_module(void)
                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");