gnome-mud r741 - in trunk: . src



Author: lharris
Date: Tue Feb 17 18:59:10 2009
New Revision: 741
URL: http://svn.gnome.org/viewvc/gnome-mud?rev=741&view=rev

Log:
Server disconnects act in same manner as user disconnects.


Modified:
   trunk/ChangeLog
   trunk/src/mud-connection-view.c

Modified: trunk/src/mud-connection-view.c
==============================================================================
--- trunk/src/mud-connection-view.c	(original)
+++ trunk/src/mud-connection-view.c	Tue Feb 17 18:59:10 2009
@@ -1054,6 +1054,10 @@
     MudConnectionView *view = MUD_CONNECTION_VIEW(pview);
     gint length;
 
+#ifdef ENABLE_GST
+    MudMSPDownloadItem *item;
+#endif
+
     g_assert(view != NULL);
 
     switch(event->type)
@@ -1068,6 +1072,26 @@
             break;
 
         case GNET_CONN_CLOSE:
+#ifdef ENABLE_GST
+            if(view->priv->download_queue)
+                while((item = (MudMSPDownloadItem *)g_queue_pop_head(view->priv->download_queue)) != NULL)
+                    mud_telnet_msp_download_item_free(item);
+
+            if(view->priv->download_queue)
+                g_queue_free(view->priv->download_queue);
+
+            view->priv->download_queue = NULL;
+#endif
+
+            view->priv->processed = NULL;
+
+            gnet_conn_disconnect(view->connection);
+            gnet_conn_unref(view->connection);
+            view->connection = NULL;
+
+            if(view->priv->telnet)
+                g_object_unref(view->priv->telnet);
+
             mud_connection_view_add_text(view, _("*** Connection closed.\n"), Error);
             break;
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]