From f217ec48a449eb41f17cd9de421856ca893c15f2 Mon Sep 17 00:00:00 2001
From: Mathieu Parent <math.parent@gmail.com>
Date: Sat, 26 Feb 2011 10:51:27 +0100
Subject: [PATCH] Skinny: remove some unused vars

---
 src/mod/endpoints/mod_skinny/mod_skinny.c | 14 +++++----
 src/mod/endpoints/mod_skinny/mod_skinny.h | 35 +++++++++++------------
 2 files changed, 24 insertions(+), 25 deletions(-)

diff --git a/src/mod/endpoints/mod_skinny/mod_skinny.c b/src/mod/endpoints/mod_skinny/mod_skinny.c
index 32b4ef8fa2..b05806b8d9 100644
--- a/src/mod/endpoints/mod_skinny/mod_skinny.c
+++ b/src/mod/endpoints/mod_skinny/mod_skinny.c
@@ -1515,6 +1515,8 @@ static void *SWITCH_THREAD_FUNC skinny_profile_run(switch_thread_t *thread, void
 	listener_t *listener;
 	switch_memory_pool_t *tmp_pool = NULL, *listener_pool = NULL;
 	uint32_t errs = 0;
+	switch_sockaddr_t *local_sa = NULL;
+	switch_sockaddr_t *remote_sa =NULL;
 
 	if (switch_core_new_memory_pool(&tmp_pool) != SWITCH_STATUS_SUCCESS) {
 		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "OH OH no pool\n");
@@ -1598,13 +1600,13 @@ new_socket:
 
 		switch_mutex_init(&listener->flag_mutex, SWITCH_MUTEX_NESTED, listener->pool);
 
-		switch_socket_addr_get(&listener->remote_sa, SWITCH_TRUE, listener->sock);
-		switch_get_addr(listener->remote_ip, sizeof(listener->remote_ip), listener->remote_sa);
-		listener->remote_port = switch_sockaddr_get_port(listener->remote_sa);
+		switch_socket_addr_get(&remote_sa, SWITCH_TRUE, listener->sock);
+		switch_get_addr(listener->remote_ip, sizeof(listener->remote_ip), remote_sa);
+		listener->remote_port = switch_sockaddr_get_port(remote_sa);
 
-		switch_socket_addr_get(&listener->local_sa, SWITCH_FALSE, listener->sock);
-		switch_get_addr(listener->local_ip, sizeof(listener->local_ip), listener->local_sa);
-		listener->local_port = switch_sockaddr_get_port(listener->local_sa);
+		switch_socket_addr_get(&local_sa, SWITCH_FALSE, listener->sock);
+		switch_get_addr(listener->local_ip, sizeof(listener->local_ip), local_sa);
+		listener->local_port = switch_sockaddr_get_port(local_sa);
 
 		launch_listener_thread(listener);
 
diff --git a/src/mod/endpoints/mod_skinny/mod_skinny.h b/src/mod/endpoints/mod_skinny/mod_skinny.h
index bf59c673e6..eb7e45ebc0 100644
--- a/src/mod/endpoints/mod_skinny/mod_skinny.h
+++ b/src/mod/endpoints/mod_skinny/mod_skinny.h
@@ -132,28 +132,25 @@ typedef enum {
 
 #define SKINNY_MAX_LINES 42
 struct listener {
-    skinny_profile_t *profile;
-    char device_name[16];
-    uint32_t device_instance;
-    uint32_t device_type;
-    
+	skinny_profile_t *profile;
+	char device_name[16];
+	uint32_t device_instance;
+	uint32_t device_type;
+
 	char firmware_version[16];
 	char *soft_key_set_set;
 
-    switch_socket_t *sock;
-    switch_memory_pool_t *pool;
-    switch_thread_rwlock_t *rwlock;
-    switch_sockaddr_t *remote_sa;
-    char remote_ip[50];
-    switch_port_t remote_port;
-    switch_sockaddr_t *local_sa;
-    char local_ip[50];
-    switch_port_t local_port;
-    switch_mutex_t *flag_mutex;
-    uint32_t flags;
-    uint32_t id;
-    time_t expire_time;
-    struct listener *next;
+	switch_socket_t *sock;
+	switch_memory_pool_t *pool;
+	switch_thread_rwlock_t *rwlock;
+	char remote_ip[50];
+	switch_port_t remote_port;
+	char local_ip[50];
+	switch_port_t local_port;
+	switch_mutex_t *flag_mutex;
+	uint32_t flags;
+	time_t expire_time;
+	struct listener *next;
 };
 
 typedef struct listener listener_t;