Changeset 1951
- Timestamp:
- 05/14/07 17:37:59
- Files:
-
- trunk/ChangeLog (modified) (1 diff)
- trunk/libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-folder.c (modified) (2 diffs)
- trunk/libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-store.c (modified) (1 diff)
- trunk/libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-store.h (modified) (1 diff)
- trunk/po/Makefile.in.in (modified) (3 diffs)
- trunk/tests/functional (modified) (1 prop)
- trunk/tests/functional/.svnignore (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/ChangeLog
r1950 r1951 1 2007-05-14 Philip Van Hoof <pvanhoof@gnome.org> 2 3 * Waiting for the + continuation after IDLE 4 * Please watch this fix with different IMAP implementations 5 1 6 2007-05-14 Sergio Villar Senin <svillar@igalia.com> 2 7 trunk/libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-folder.c
r1949 r1951 3389 3389 idle_real_start (CamelImapStore *store) 3390 3390 { 3391 char *resp; 3392 CamelException ex = CAMEL_EXCEPTION_INITIALISER; 3393 3391 3394 idle_debug ("idle_real_start\n"); 3392 3395 … … 3396 3399 camel_stream_printf (store->ostream, "%s IDLE\r\n", 3397 3400 store->idle_prefix); 3401 3402 resp = NULL; 3403 while (camel_imap_store_readline_nl (store, &resp, &ex) > 0) 3404 { 3405 gboolean tbreak = FALSE; 3406 if (!strncmp (resp, "+ ", 2)) 3407 tbreak = TRUE; 3408 /* printf ("-> %s\n", resp); */ 3409 g_free (resp); resp=NULL; 3410 if (tbreak) 3411 break; 3412 } 3413 if (resp) 3414 g_free (resp); 3415 3398 3416 g_mutex_unlock (store->stream_lock); 3399 3417 trunk/libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-store.c
r1949 r1951 3642 3642 3643 3643 ssize_t 3644 camel_imap_store_readline_nl (CamelImapStore *store, char **dest, CamelException *ex) 3645 { 3646 CamelStreamBuffer *stream; 3647 char linebuf[1024] = {0}; 3648 GByteArray *ba; 3649 ssize_t nread; 3650 3651 g_return_val_if_fail (CAMEL_IS_IMAP_STORE (store), -1); 3652 g_return_val_if_fail (dest, -1); 3653 3654 *dest = NULL; 3655 3656 /* Check for connectedness. Failed (or cancelled) operations will 3657 * close the connection. We can't expect a read to have any 3658 * meaning if we reconnect, so always set an exception. 3659 */ 3660 3661 if (!camel_disco_store_check_online((CamelDiscoStore *)store, ex)) 3662 return -1; 3663 3664 camel_imap_store_restore_stream_buffer (store); 3665 stream = CAMEL_STREAM_BUFFER (store->istream); 3666 3667 ba = g_byte_array_new (); 3668 while ((nread = camel_stream_buffer_gets (stream, linebuf, sizeof (linebuf))) > 0) { 3669 g_byte_array_append (ba, (const guchar*) linebuf, nread); 3670 if (linebuf[nread - 1] == '\n') 3671 break; 3672 } 3673 3674 if (nread <= 0) { 3675 if (errno == EINTR) 3676 { 3677 CamelException mex = CAMEL_EXCEPTION_INITIALISER; 3678 camel_exception_set (ex, CAMEL_EXCEPTION_USER_CANCEL, _("Operation cancelled")); 3679 camel_service_disconnect (CAMEL_SERVICE (store), FALSE, NULL); 3680 camel_service_connect (CAMEL_SERVICE (store), &mex); 3681 } else { 3682 camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE, 3683 _("Server unexpectedly disconnected: %s"), 3684 g_strerror (errno)); 3685 camel_service_disconnect (CAMEL_SERVICE (store), FALSE, NULL); 3686 } 3687 3688 g_byte_array_free (ba, TRUE); 3689 return -1; 3690 } 3691 3692 if (camel_verbose_debug) { 3693 fprintf (stderr, "received: "); 3694 fwrite (ba->data, 1, ba->len, stderr); 3695 } 3696 3697 /* camel-imap-command.c:imap_read_untagged expects the CRLFs 3698 to be stripped off and be nul-terminated *sigh* */ 3699 nread = ba->len - 1; 3700 ba->data[nread] = '\0'; 3701 if (ba->data[nread - 1] == '\r') { 3702 ba->data[nread - 1] = '\0'; 3703 nread--; 3704 } 3705 3706 *dest = (char *) ba->data; 3707 g_byte_array_free (ba, FALSE); 3708 3709 return nread; 3710 } 3711 3712 ssize_t 3644 3713 camel_imap_store_readline_nb (CamelImapStore *store, char **dest, CamelException *ex) 3645 3714 { trunk/libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-store.h
r1949 r1951 175 175 gboolean camel_imap_store_connected (CamelImapStore *store, CamelException *ex); 176 176 177 ssize_t camel_imap_store_readline_nl (CamelImapStore *store, char **dest, CamelException *ex); 177 178 ssize_t camel_imap_store_readline_nb (CamelImapStore *store, char **dest, CamelException *ex); 178 179 ssize_t camel_imap_store_readline (CamelImapStore *store, char **dest, CamelException *ex); trunk/po/Makefile.in.in
r1945 r1951 26 26 prefix = @prefix@ 27 27 exec_prefix = @exec_prefix@ 28 datarootdir = @datarootdir@ 28 29 datadir = @datadir@ 29 30 libdir = @libdir@ … … 41 42 GMSGFMT = @GMSGFMT@ 42 43 MSGFMT = @MSGFMT@ 44 MSGFMT_OPTS = @MSGFMT_OPTS@ 43 45 XGETTEXT = @XGETTEXT@ 44 46 MSGMERGE = msgmerge … … 79 81 .po.gmo: 80 82 file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \ 81 && rm -f $$file && $(GMSGFMT) -c-o $$file $<83 && rm -f $$file && $(GMSGFMT) $(MSGFMT_OPTS) -o $$file $< 82 84 83 85 .po.cat: trunk/tests/functional
- Property svn:ignore changed from anything msg-sender msg-transfer folder-transfer folder-lister-async tags Makefile.in folder-lister .svnignore stamp-h1 config.h .libs .deps Makefile folder-transfer to account-refresh anything msg-sender msg-transfer folder-transfer folder-lister-async tags Makefile.in folder-lister .svnignore stamp-h1 config.h .libs .deps Makefile folder-transfer
trunk/tests/functional/.svnignore
r1797 r1951 1 account-refresh 1 2 anything 2 3 msg-sender
