[asterisk-commits] file: branch file/netsock2 r95444 - in /team/file/netsock2: include/asterisk/...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Dec 31 12:51:20 CST 2007


Author: file
Date: Mon Dec 31 12:51:19 2007
New Revision: 95444

URL: http://svn.digium.com/view/asterisk?view=rev&rev=95444
Log:
constify a few things.

Modified:
    team/file/netsock2/include/asterisk/netsock2.h
    team/file/netsock2/main/netsock2.c

Modified: team/file/netsock2/include/asterisk/netsock2.h
URL: http://svn.digium.com/view/asterisk/team/file/netsock2/include/asterisk/netsock2.h?view=diff&rev=95444&r1=95443&r2=95444
==============================================================================
--- team/file/netsock2/include/asterisk/netsock2.h (original)
+++ team/file/netsock2/include/asterisk/netsock2.h Mon Dec 31 12:51:19 2007
@@ -196,7 +196,7 @@
  * \param network_layer Network layer to look for
  * \return Returns default socket on success, NULL on failure
  */
-struct ast_netsock2_socket *ast_netsock2_get_default_socket(struct ast_netsock2_socket_list *socket_list, enum ast_netsock2_transport transport, enum ast_netsock2_network_layer network_layer);
+struct ast_netsock2_socket *ast_netsock2_get_default_socket(const struct ast_netsock2_socket_list *socket_list, enum ast_netsock2_transport transport, enum ast_netsock2_network_layer network_layer);
 
 /*! \brief Find a socket based on IP address and port
  * \param socket_list Socket list to search through
@@ -233,13 +233,13 @@
  * \param addr Address structure
  * \return Returns pointer to buffer
  */
-const char *ast_netsock2_sa_get_address(struct ast_netsock2_addr *addr);
+const char *ast_netsock2_sa_get_address(const struct ast_netsock2_addr *addr);
 
 /*! \brief Return a pointer to a buffer containing the port in a ast_netsock2_addr structure
  * \param addr Address structure
  * \return Returns pointer to buffer
  */
-const char *ast_netsock2_sa_get_port(struct ast_netsock2_addr *addr);
+const char *ast_netsock2_sa_get_port(const struct ast_netsock2_addr *addr);
 
 /*! \brief Copy address information from one ast_netsock2_addr structure to another
  * \param addr0 Structure to copy from

Modified: team/file/netsock2/main/netsock2.c
URL: http://svn.digium.com/view/asterisk/team/file/netsock2/main/netsock2.c?view=diff&rev=95444&r1=95443&r2=95444
==============================================================================
--- team/file/netsock2/main/netsock2.c (original)
+++ team/file/netsock2/main/netsock2.c Mon Dec 31 12:51:19 2007
@@ -703,7 +703,7 @@
  * \param network_layer Network layer to look for
  * \return Returns default socket on success, NULL on failure
  */
-struct ast_netsock2_socket *ast_netsock2_get_default_socket(struct ast_netsock2_socket_list *socket_list, enum ast_netsock2_transport transport, enum ast_netsock2_network_layer network_layer)
+struct ast_netsock2_socket *ast_netsock2_get_default_socket(const struct ast_netsock2_socket_list *socket_list, enum ast_netsock2_transport transport, enum ast_netsock2_network_layer network_layer)
 {
 	struct ast_netsock2_socket *socket = NULL;
 
@@ -830,7 +830,7 @@
  * \param addr Address structure
  * \return Returns pointer to buffer
  */
-const char *ast_netsock2_sa_get_address(struct ast_netsock2_addr *addr)
+const char *ast_netsock2_sa_get_address(const struct ast_netsock2_addr *addr)
 {
 	char *buf;
 
@@ -847,7 +847,7 @@
  * \param addr Address structure
  * \return Returns pointer to buffer
  */
-const char *ast_netsock2_sa_get_port(struct ast_netsock2_addr *addr)
+const char *ast_netsock2_sa_get_port(const struct ast_netsock2_addr *addr)
 {
 	char *buf;
 




More information about the asterisk-commits mailing list