Fixed bz-decompress error message bug.
[doldaconnect.git] / clients / gtk2 / hublist.c
index 7342945..2420ff8 100644 (file)
@@ -148,7 +148,7 @@ static void fdcb(gpointer data, gint source, GdkInputCondition cond)
                    bzs->avail_out = mybufsize - mybufdata;
                    bzret = BZ2_bzDecompress(bzs);
                    if((bzret != BZ_OK) && (bzret != BZ_STREAM_END)) {
-                       msgbox(GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("Could not decompress hublist (%i)"), hret);
+                       msgbox(GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("Could not decompress hublist (%i)"), bzret);
                        aborthublist();
                        return;
                    }
@@ -200,6 +200,7 @@ void fetchhublist(char *url, regex_t *flt)
        msgbox(GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("Could not read hublist from server: %s"), strerror(errno));
        return;
     }
+    hc->autoredir = 1;
     state = 0;
     settags();
     gtk_widget_show(main_pubhubbarbox);
@@ -210,6 +211,7 @@ void fetchhublist(char *url, regex_t *flt)
     len = strlen(url);
     p = url + len;
     if((len > 4) && !strncmp(p - 4, ".bz2", 4)) {
+       /* Because using Transfer-Encoding would just be too good! */
        p -= 4;
        len -= 4;
        bzs = memset(smalloc(sizeof(*bzs)), 0, sizeof(*bzs));
@@ -222,6 +224,7 @@ void fetchhublist(char *url, regex_t *flt)
        }
     }
     if((len > 4) && !strncmp(p - 4, ".xml", 4)) {
+       /* Because using Content-Type would just be too good! */
        p -= 4;
        len -= 4;
        handler = pubhubxmlhandler;