# HG changeset patch
# User leo_sobral
# Date 1174657408 0
# Node ID 7304e78d6307a90272630e70c6f03644269b2486
# Parent  116e4fac8e96c5833f2f2837fbd723b53e493930
[svn r441] refactoring

diff -r 116e4fac8e96 -r 7304e78d6307 gmyth/src/gmyth_monitor_handler.c
--- a/gmyth/src/gmyth_monitor_handler.c	Thu Mar 22 22:02:12 2007 +0000
+++ b/gmyth/src/gmyth_monitor_handler.c	Fri Mar 23 13:43:28 2007 +0000
@@ -175,7 +175,6 @@
   if ( monitor->event_sock != NULL )  
   {
   	g_object_unref( monitor->event_sock );
-  	/*gmyth_socket_close_connection( monitor->event_sock );*/  	
   	monitor->event_sock = NULL;
   }
 
@@ -314,13 +313,14 @@
   gmyth_debug ("Monitor event socket --- hostname: %s, port %d\n", monitor->hostname, monitor->port);
   
   /* configure the event socket */
-  //if ( NULL == monitor->event_sock ) { 
-    if (!gmyth_connect_to_backend_monitor (monitor)) {
-      gmyth_debug( "Connection to backend failed (Event Socket)." );
-      ret = FALSE;
-    }
-   else {
-    g_warning("Remote monitor event socket already created.\n");
+  if ( NULL == monitor->event_sock ) { 
+      if (!gmyth_connect_to_backend_monitor (monitor)) {
+          gmyth_debug( "Connection to backend failed (Event Socket)." );
+          ret = FALSE;
+      }
+      else {
+          g_warning("Remote monitor event socket already created.\n");
+      }
   }
 
   return ret;