Don't set exception to g_strerror (errno) when nread == 0, because it
authorDan Winship <danw@src.gnome.org>
Tue, 28 Nov 2000 21:27:16 +0000 (21:27 +0000)
committerDan Winship <danw@src.gnome.org>
Tue, 28 Nov 2000 21:27:16 +0000 (21:27 +0000)
* camel-remote-store.c (remote_recv_line): Don't set exception to
g_strerror (errno) when nread == 0, because it won't have been
set.

camel/ChangeLog
camel/camel-remote-store.c

index 59b47f7..430cfc7 100644 (file)
@@ -1,5 +1,9 @@
 2000-11-28  Dan Winship  <danw@helixcode.com>
 
+       * camel-remote-store.c (remote_recv_line): Don't set exception to
+       g_strerror (errno) when nread == 0, because it won't have been
+       set.
+
        * providers/pop3/camel-pop3-folder.c (pop3_finalize): Don't try to
        free things if they haven't been set yet.
 
index 7c64ab6..c69ba35 100644 (file)
@@ -448,7 +448,8 @@ remote_recv_line (CamelRemoteStore *store, char **dest, CamelException *ex)
                g_free (ret);
                ret = NULL;
                camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
-                                    g_strerror (errno));
+                                    nread ? g_strerror (errno) :
+                                    _("Server disconnected."));
                
                camel_service_disconnect (CAMEL_SERVICE (store), FALSE, NULL);
                return -1;