[xmppd-dev] commit r1524 - in trunk/jabberd14/jabberd: . lib

mail at jabberd.org mail at jabberd.org
Tue Apr 29 23:12:14 UTC 2008


Author: mawis
Date: Tue Apr 29 15:51:23 2008
New Revision: 1524

Log:
Even more const declarations ...


Modified:
   trunk/jabberd14/jabberd/jabberd.h
   trunk/jabberd14/jabberd/lib/jabberdlib.h
   trunk/jabberd14/jabberd/lib/socket.cc
   trunk/jabberd14/jabberd/mio.cc

Modified: trunk/jabberd14/jabberd/jabberd.h
==============================================================================
--- trunk/jabberd14/jabberd/jabberd.h	(original)
+++ trunk/jabberd14/jabberd/jabberd.h	Tue Apr 29 15:51:23 2008
@@ -517,7 +517,7 @@
 void mio_connect(char *host, int port, mio_std_cb cb, void *cb_arg, int timeout, mio_handlers mh);
 
 /* Starts listening on a port/ip, returns NULL if failed to listen */
-mio mio_listen(int port, char *sourceip, mio_std_cb cb, void *cb_arg, mio_handlers mh);
+mio mio_listen(int port, char const* sourceip, mio_std_cb cb, void *cb_arg, mio_handlers mh);
 
 int _mio_write_dump(mio m);
 

Modified: trunk/jabberd14/jabberd/lib/jabberdlib.h
==============================================================================
--- trunk/jabberd14/jabberd/lib/jabberdlib.h	(original)
+++ trunk/jabberd14/jabberd/lib/jabberdlib.h	Tue Apr 29 15:51:23 2008
@@ -438,10 +438,10 @@
 #define NETSOCKET_UDP 2    /**< type of a UDP connection socket */
 
 #ifndef WIN32
-int make_netsocket(u_short port, char *host, int type);
-struct in_addr *make_addr(char *host);
+int make_netsocket(u_short port, char const* host, int type);
+struct in_addr *make_addr(char const* host);
 #ifdef WITH_IPV6
-struct in6_addr *make_addr_ipv6(char *host);
+struct in6_addr *make_addr_ipv6(char const* host);
 #endif
 #endif
 

Modified: trunk/jabberd14/jabberd/lib/socket.cc
==============================================================================
--- trunk/jabberd14/jabberd/lib/socket.cc	(original)
+++ trunk/jabberd14/jabberd/lib/socket.cc	Tue Apr 29 15:51:23 2008
@@ -45,7 +45,7 @@
  * @param type type of socket (NETSOCKET_SERVER, NETSOCKET_CLIENT; or NETSOCKET_UDP)
  * @return file handle of the new socket
  */
-int make_netsocket(u_short port, char *host, int type) {
+int make_netsocket(u_short port, char const* host, int type) {
     int s, flag = 1;
 #ifdef WITH_IPV6
     struct sockaddr_in6 sa;
@@ -149,7 +149,7 @@
  * @param host the IPv4 address or hostname to convert, on NULL, the hostname is used
  * @return the in_addr struct that holds the result (pointer to a static structure, overwritten on next call!)
  */
-struct in_addr *make_addr(char *host) {
+struct in_addr *make_addr(char const* host) {
     struct hostent *hp;
     static struct in_addr addr;
     char myname[MAXHOSTNAMELEN + 1];
@@ -203,7 +203,7 @@
  * @param host the IPv4 or IPv6 address or hostname to convert, on NULL, the hostname is used
  * @return the in6_addr struct that holds the result (pointer to a static structure, overwritten on next call!)
  */
-struct in6_addr *make_addr_ipv6(char *host) {
+struct in6_addr *make_addr_ipv6(char const* host) {
     static struct in6_addr addr;
     struct addrinfo hints;
     struct addrinfo *addr_res;

Modified: trunk/jabberd14/jabberd/mio.cc
==============================================================================
--- trunk/jabberd14/jabberd/mio.cc	(original)
+++ trunk/jabberd14/jabberd/mio.cc	Tue Apr 29 15:51:23 2008
@@ -1534,7 +1534,7 @@
  * @param mh ::mio_handlers used for this connection
  * @return the listening mio object that has been created, NULL on failure
  */
-mio mio_listen(int port, char *listen_host, mio_std_cb cb, void *arg, mio_handlers mh) {
+mio mio_listen(int port, char const* listen_host, mio_std_cb cb, void *arg, mio_handlers mh) {
     mio        newm;
     int        fd;
 


More information about the dev mailing list