From 0d6cf384c12a1e2f4797b4a94a55c1d47aeb0087 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Tue, 5 Jun 2007 15:39:56 +0000 Subject: [PATCH] small fix and new macro git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5260 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- scripts/socket/socket2me/socket2me.c | 2 +- src/include/switch_utils.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/socket/socket2me/socket2me.c b/scripts/socket/socket2me/socket2me.c index 17ac13f7ba..1f9eebb2a8 100644 --- a/scripts/socket/socket2me/socket2me.c +++ b/scripts/socket/socket2me/socket2me.c @@ -248,7 +248,7 @@ void client_run(int client_socket, char *local_ip, int local_port, char *remote_ addr.sin_family = AF_INET; addr.sin_addr.s_addr = htonl(INADDR_ANY); - sendaddr.sin_addr.s_addr = inet_addr(remote_ip); + addr.sin_addr.s_addr = inet_addr(remote_ip); addr.sin_port = htons(remote_port); sendaddr.sin_family = AF_INET; diff --git a/src/include/switch_utils.h b/src/include/switch_utils.h index f9ff741aeb..aca1596ccb 100644 --- a/src/include/switch_utils.h +++ b/src/include/switch_utils.h @@ -175,6 +175,7 @@ switch_mutex_unlock(obj->flag_mutex); */ #define switch_copy_flags(dest, src, flags) (dest)->flags &= ~(flags); (dest)->flags |= ((src)->flags & (flags)) +#define switch_set_string(_dst, _src) switch_copy_string(_dst, _src, sizeof(_dst)) /*! \brief Free a pointer and set it to NULL unless it already is NULL