Changeset 2120
- Timestamp:
- 06/11/07 13:56:45
- Files:
-
- trunk/ChangeLog (modified) (1 diff)
- trunk/libtinymail-camel/camel-lite/camel/providers/pop3/camel-pop3-stream.c (modified) (4 diffs)
- trunk/libtinymail-camel/camel-lite/camel/providers/pop3/camel-pop3-stream.h (modified) (1 diff)
- trunk/libtinymail-camel/tny-camel-pop-store-account.c (modified) (2 diffs)
- trunk/libtinymail-camel/tny-camel-pop-store-account.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/ChangeLog
r2115 r2120 11 11 removed (for whatever reason in the TnyFolderMonitor): more robust 12 12 * Fixed some IDLE deadlocks 13 * Added tny_camel_pop_store_account_reconnect 14 15 * This was a minor API change 13 16 14 17 2007-06-08 Sergio Villar Senin <svillar@igalia.com> trunk/libtinymail-camel/camel-lite/camel/providers/pop3/camel-pop3-stream.c
r1943 r2120 64 64 return is->end - is->ptr; 65 65 } else { 66 dd(printf("POP3_STREAM_FILL(ERROR): '%s'\n", strerror (errno)));66 pop3_debug ("POP3_STREAM_FILL(ERROR): '%s'\n", strerror (errno)); 67 67 return -1; 68 68 } … … 106 106 is->mode = CAMEL_POP3_STREAM_EOD; 107 107 is->state = 0; 108 dd(printf("POP3_STREAM_READ(%d):\n%.*s\n", (int)(o-buffer), (int)(o-buffer), buffer));108 pop3_debug ("POP3_STREAM_READ(%d):\n%.*s\n", (int)(o-buffer), (int)(o-buffer), buffer); 109 109 return o-buffer; 110 110 } … … 139 139 is->state = state; 140 140 141 dd(printf("POP3_STREAM_READ(%d):\n%.*s\n", (int)(o-buffer), (int)(o-buffer), buffer));141 pop3_debug ("POP3_STREAM_READ(%d):\n%.*s\n", (int)(o-buffer), (int)(o-buffer), buffer); 142 142 143 143 return o-buffer; … … 148 148 { 149 149 CamelPOP3Stream *is = (CamelPOP3Stream *)stream; 150 151 if (strncmp (buffer, "PASS ", 5) != 0) 152 dd(printf("POP3_STREAM_WRITE(%d):\n%.*s\n", (int)n, (int)n, buffer)); 153 else 154 dd(printf("POP3_STREAM_WRITE(%d):\nPASS xxxxxxxx\n", (int)n)); 155 150 151 if (strncmp (buffer, "PASS ", 5) != 0) { 152 pop3_debug("POP3_STREAM_WRITE(%d):\n%.*s\n", (int)n, (int)n, buffer); 153 } else { 154 pop3_debug("POP3_STREAM_WRITE(%d):\nPASS xxxxxxxx\n", (int)n); 155 } 156 156 157 return camel_stream_write(is->source, buffer, n); 157 158 } trunk/libtinymail-camel/camel-lite/camel/providers/pop3/camel-pop3-stream.h
r1943 r2120 26 26 27 27 #include <camel/camel-stream.h> 28 29 #ifdef DEBUG 30 #define pop3_debug g_print 31 #else 32 #define pop3_debug(o,...) 33 #endif 34 28 35 29 36 #define CAMEL_POP3_STREAM(obj) CAMEL_CHECK_CAST (obj, camel_pop3_stream_get_type (), CamelPOP3Stream) trunk/libtinymail-camel/tny-camel-pop-store-account.c
r2074 r2120 37 37 #include <camel/camel-session.h> 38 38 #include <camel/camel-store.h> 39 #include <camel/camel-service.h> 40 39 41 #include <camel/providers/pop3/camel-pop3-store.h> 40 42 … … 145 147 } 146 148 149 /** 150 * tny_camel_pop_store_account_reconnect: 151 * @self: a #TnyCamelPOPStoreAccount instance 152 * 153 * Reconnect to the POP3 service. The reason why this API exists is because 154 * certain services (like GMail in 2007) suddenly give you more messages in the 155 * LIST result of POP after you disconnected and reconnect. 156 **/ 157 void 158 tny_camel_pop_store_account_reconnect (TnyCamelPOPStoreAccount *self) 159 { 160 CamelException ex = CAMEL_EXCEPTION_INITIALISER; 161 TnyCamelPopStoreAccountPriv *priv = TNY_CAMEL_POP_STORE_ACCOUNT_GET_PRIVATE (self); 162 const CamelService *service = _tny_camel_account_get_service (TNY_CAMEL_ACCOUNT (self)); 163 164 g_mutex_lock (priv->lock); 165 camel_service_disconnect ((CamelService *) service, TRUE, &ex); 166 if (camel_exception_is_set (&ex)) 167 camel_exception_clear (&ex); 168 camel_service_connect ((CamelService *) service, &ex); 169 g_mutex_unlock (priv->lock); 170 171 return; 172 } 147 173 148 174 static void trunk/libtinymail-camel/tny-camel-pop-store-account.h
r2069 r2120 54 54 void tny_camel_pop_store_account_set_leave_messages_on_server (TnyCamelPOPStoreAccount *self, gboolean enabled); 55 55 56 void tny_camel_pop_store_account_reconnect (TnyCamelPOPStoreAccount *self); 57 56 58 G_END_DECLS 57 59
