Nico Golde:
authornion <nion@e385b8ad-14ed-0310-8656-cc95a2468c6d>
Thu, 8 Sep 2005 23:26:52 +0000 (23:26 +0000)
committernion <nion@e385b8ad-14ed-0310-8656-cc95a2468c6d>
Thu, 8 Sep 2005 23:26:52 +0000 (23:26 +0000)
- fixed problem with mutt_progress_bar

git-svn-id: svn://svn.berlios.de/mutt-ng/trunk@495 e385b8ad-14ed-0310-8656-cc95a2468c6d

imap/imap.c
imap/message.c

index cc9f60c..4f0395f 100644 (file)
@@ -211,8 +211,10 @@ int imap_read_literal (FILE * fp, IMAP_DATA * idata, long bytes, progress_t* bar
       r = 0;
 #endif
     fputc (c, fp);
       r = 0;
 #endif
     fputc (c, fp);
+#ifdef USE_SOCKET
     if (bar && pos % 1024)
       mutt_progress_bar (bar, pos);
     if (bar && pos % 1024)
       mutt_progress_bar (bar, pos);
+#endif
 #ifdef DEBUG
     if (DebugLevel >= IMAP_LOG_LTRL)
       fputc (c, DebugFile);
 #ifdef DEBUG
     if (DebugLevel >= IMAP_LOG_LTRL)
       fputc (c, DebugFile);
index 58fe61f..949ca2c 100644 (file)
@@ -398,7 +398,9 @@ int imap_fetch_message (MESSAGE * msg, CONTEXT * ctx, int msgno)
           }
           bar.size = bytes;
           bar.msg = _("Fetching message...");
           }
           bar.size = bytes;
           bar.msg = _("Fetching message...");
+#ifdef USE_SOCKET
           mutt_progress_bar (&bar, 0);
           mutt_progress_bar (&bar, 0);
+#endif
           if (imap_read_literal (msg->fp, idata, bytes, &bar) < 0)
             goto bail;
           /* pick up trailing line */
           if (imap_read_literal (msg->fp, idata, bytes, &bar) < 0)
             goto bail;
           /* pick up trailing line */
@@ -527,7 +529,9 @@ int imap_append_message (CONTEXT * ctx, MESSAGE * msg)
 
   bar.msg = _("Uploading message...");
   bar.size = len;
 
   bar.msg = _("Uploading message...");
   bar.size = len;
+#ifdef USE_SOCKET
   mutt_progress_bar (&bar, 0);
   mutt_progress_bar (&bar, 0);
+#endif
 
   imap_munge_mbox_name (mbox, sizeof (mbox), mailbox);
   snprintf (buf, sizeof (buf), "APPEND %s (%s%s%s%s%s) {%lu}", mbox,
 
   imap_munge_mbox_name (mbox, sizeof (mbox), mailbox);
   snprintf (buf, sizeof (buf), "APPEND %s (%s%s%s%s%s) {%lu}", mbox,
@@ -567,7 +571,9 @@ int imap_append_message (CONTEXT * ctx, MESSAGE * msg)
     if (len > sizeof (buf) - 3) {
       sent += len;
       flush_buffer (buf, &len, idata->conn);
     if (len > sizeof (buf) - 3) {
       sent += len;
       flush_buffer (buf, &len, idata->conn);
-      mutt_progress_bar (&bar, sent);
+#ifdef USE_SOCKET
+    mutt_progress_bar (&bar, sent);
+#endif
     }
   }
 
     }
   }