From: miker Date: Thu, 31 Jan 2008 19:09:46 +0000 (+0000) Subject: Patch from Scott McKellar to fix up some const correctness issues. X-Git-Tag: osrf_rel_2_0_1~731 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=5a536af1956b3ee463d5ef68ad2497de0a145d0e;p=OpenSRF.git Patch from Scott McKellar to fix up some const correctness issues. git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1236 9efc2488-bf62-4759-914b-345cdb29e865 --- diff --git a/include/opensrf/socket_bundle.h b/include/opensrf/socket_bundle.h index 555a211..bec656a 100644 --- a/include/opensrf/socket_bundle.h +++ b/include/opensrf/socket_bundle.h @@ -69,7 +69,7 @@ void socket_manager_free(socket_manager* mgr); socket_type is one of INET or UNIX */ int socket_open_tcp_server(socket_manager*, int port, const char* listen_ip ); -int socket_open_unix_server(socket_manager* mgr, char* path); +int socket_open_unix_server(socket_manager* mgr, const char* path); int socket_open_udp_server( socket_manager* mgr, int port, const char* listen_ip ); @@ -81,7 +81,7 @@ int socket_open_tcp_client(socket_manager*, int port, const char* dest_addr); returns 0 on success. -1 on failure. */ int socket_open_unix_client(socket_manager*, const char* sock_path); -int socket_open_udp_client( socket_manager* mgr, int port, char* dest_addr); +int socket_open_udp_client( socket_manager* mgr, int port, const char* dest_addr); /* sends the given data to the given socket. returns 0 on success, -1 otherwise */ int socket_send(int sock_fd, const char* data); diff --git a/src/libopensrf/socket_bundle.c b/src/libopensrf/socket_bundle.c index 3a09132..9829cb2 100644 --- a/src/libopensrf/socket_bundle.c +++ b/src/libopensrf/socket_bundle.c @@ -129,7 +129,7 @@ int socket_open_tcp_server(socket_manager* mgr, int port, const char* listen_ip) return sock_fd; } -int socket_open_unix_server(socket_manager* mgr, char* path) { +int socket_open_unix_server(socket_manager* mgr, const char* path) { if(mgr == NULL || path == NULL) return -1; osrfLogDebug( OSRF_LOG_MARK, "opening unix socket at %s", path); @@ -291,7 +291,7 @@ int socket_open_tcp_client(socket_manager* mgr, int port, const char* dest_addr) int socket_open_udp_client( - socket_manager* mgr, int port, char* dest_addr) { + socket_manager* mgr, int port, const char* dest_addr) { int sockfd; struct sockaddr_in client_addr, server_addr;