aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-06-01 04:14:00 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-06-01 04:14:00 +0800
commit4b63089bda38776bf4aa20dc97e6db41823a061c (patch)
tree1fde7a92531e4fb0bb09f2c2268966c39dfb20f2 /camel
parent60a6173744071e0eeacd73cfcba029fa593e81ac (diff)
downloadgsoc2013-evolution-4b63089bda38776bf4aa20dc97e6db41823a061c.tar.gz
gsoc2013-evolution-4b63089bda38776bf4aa20dc97e6db41823a061c.tar.zst
gsoc2013-evolution-4b63089bda38776bf4aa20dc97e6db41823a061c.zip
Revert my fix from the other day since camel_imap_command_response()
2002-05-31 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (imap_rescan): Revert my fix from the other day since camel_imap_command_response() doesn't guarentee that resp will be set to NULL on error. * providers/imap/camel-imap-command.c (camel_imap_command_response): Use a different variable to get the return of imap_parse_untagged so that we don't lose the pointer to the original malloc'd respbuf buffer. svn path=/trunk/; revision=17061
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog9
-rw-r--r--camel/providers/imap/camel-imap-command.c9
-rw-r--r--camel/providers/imap/camel-imap-folder.c6
3 files changed, 18 insertions, 6 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 2005945eb9..aa2a0b9826 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,5 +1,14 @@
2002-05-31 Jeffrey Stedfast <fejj@ximian.com>
+ * providers/imap/camel-imap-folder.c (imap_rescan): Revert my fix
+ from the other day since camel_imap_command_response() doesn't
+ guarentee that resp will be set to NULL on error.
+
+ * providers/imap/camel-imap-command.c
+ (camel_imap_command_response): Use a different variable to get the
+ return of imap_parse_untagged so that we don't lose the pointer to
+ the original malloc'd respbuf buffer.
+
* camel-data-cache.c (camel_data_cache_get): If we fail to be able
to create a stream to insert into the cache, then free the 'real'
path.
diff --git a/camel/providers/imap/camel-imap-command.c b/camel/providers/imap/camel-imap-command.c
index 4309e18ddd..82ddf26ce7 100644
--- a/camel/providers/imap/camel-imap-command.c
+++ b/camel/providers/imap/camel-imap-command.c
@@ -288,7 +288,7 @@ camel_imap_command_response (CamelImapStore *store, char **response,
CamelException *ex)
{
CamelImapResponseType type;
- char *respbuf;
+ char *respbuf, *untagged;
if (camel_imap_store_readline (store, &respbuf, ex) < 0) {
CAMEL_IMAP_STORE_UNLOCK (store, command_lock);
@@ -312,9 +312,12 @@ camel_imap_command_response (CamelImapStore *store, char **response,
/* Read the rest of the response. */
type = CAMEL_IMAP_RESPONSE_UNTAGGED;
- respbuf = imap_read_untagged (store, respbuf, ex);
- if (!respbuf)
+ untagged = imap_read_untagged (store, respbuf, ex);
+ if (!untagged) {
type = CAMEL_IMAP_RESPONSE_ERROR;
+ g_free (respbuf);
+ respbuf = NULL;
+ }
break;
case '+':
diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c
index e798dcbebf..156111083a 100644
--- a/camel/providers/imap/camel-imap-folder.c
+++ b/camel/providers/imap/camel-imap-folder.c
@@ -513,9 +513,6 @@ imap_rescan (CamelFolder *folder, int exists, CamelException *ex)
g_datalist_clear (&data);
}
- /* Free the final tagged response */
- g_free (resp);
-
camel_operation_end (NULL);
if (type == CAMEL_IMAP_RESPONSE_ERROR) {
for (i = 0; i < summary_len && new[i].uid; i++)
@@ -524,6 +521,9 @@ imap_rescan (CamelFolder *folder, int exists, CamelException *ex)
return;
}
+ /* Free the final tagged response */
+ g_free (resp);
+
/* If we find a UID in the summary that doesn't correspond to
* the UID in the folder, then either: (a) it's a real UID,
* but the message was deleted on the server, or (b) it's a
8-08-193-9/+10 * Bump PORTREVISION for ports depending on the canonical version of GCCgerald2018-07-301-0/+1 * Update to Wine 3.13. This includes the following changes:gerald2018-07-222-8/+8 * Update to Wine 3.12. This includes the following changes:gerald2018-07-112-8/+8 * Update to Wine 3.11. This includes the following changes:gerald2018-06-273-6/+9 * The VKD3D option is not operational yet, and there is at least onegerald2018-06-251-0/+2 * Update to Wine 3.10. This includes the following changes:gerald2018-06-163-6/+14 * Revert inadvertret change to OPTIONS_DEFAULT in previous commit (r471203).gerald2018-05-311-1/+1 * Replace explicit settings of CFLAGS and LDFLAGS in favor of USES=localbasegerald2018-05-311-4/+2 * Add information on the Wine Staging patchset (aka the STAGING option)gerald2018-05-271-1/+3 * Update to Wine 3.9. This includes the following changes:gerald2018-05-263-14/+12 * - Infrastructure for writing kernel driver tests.gerald2018-05-143-6/+14 * For ports under `emulators', `games', `irc`, and `sysutils' categories:danfe2018-05-051-1/+0 * Update to Wine 3.7. This includes the following changes:gerald2018-05-012-6/+6 * include/wine/windows/ddk/fltkernel.h no longer depends on the STAGINGgerald2018-04-281-1/+1 * Change the name of the check-wine-devel-vs-wine-staging target togerald2018-04-181-2/+2 * Update to Wine 3.6. This includes the following changes:gerald2018-04-143-6/+9 * Remove workaround (really: requiring GCC) for a clang 6.0.0 crash ongerald2018-04-021-5/+0 * Fix pkg-plist in the presense of the STAGING option (and hence Wine Staginggerald2018-03-311-2/+0 * Update to Wine 3.5. This includes the following changes:gerald2018-03-313-7/+13 * Fully disable building Kerberos components.gerald2018-03-192-3/+4 * The Wine Staging patchset has reappeared for the time being, with newgerald2018-03-183-3/+58 * Update to Wine 3.4. This includes the following changes:gerald2018-03-173-5/+57 * Update to Wine 3.3. This includes the following changes:gerald2018-03-043-6/+9 * Remove entries tagged as %%STAGING%%. Like other parts not removed withgerald2018-02-201-71/+0 * Remove the STAGING option which has been marked BROKEN for 11 weeksgerald2018-02-191-3/+1 * Update to Wine 3.2. This includes the following changes:gerald2018-02-183-4/+15 * Fix the ibiblio.org URL in MASTER_SITE - the old address redirects,gerald2018-02-181-1/+1 * The issue of clang 6.0.0 crashing when building Wine was just resolvedgerald2018-02-091-1/+1 * Now that Wine 3.0 has been released, Wine is in regular developmentgerald2018-02-043-9/+17 * Use GCC instead of the system compiler on FreeBSD 12.x/AMD64 withgerald2018-01-281-0/+5 * Configure --without-krb5 aka Kerberos support. This should not make agerald2018-01-221-0/+1 * Update to Wine 3.0 RC6 which brings some further bug fixes.gerald2018-01-142-6/+5 * Update to Wine 3.0 RC5 which brings yet more bug fixes.gerald2018-01-082-5/+6 * Update to Wine 3.0 RC4 which brings yet more bug fixes.gerald2017-12-312-4/+4 * Replace USE_AUTOTOOLS with a plain dependency on devel/autoconf.tijl2017-12-251-4/+1 * Update to Wine 3.0 RC2, which brings a few more bug fixes.gerald2017-12-232-4/+4 * Update to Wine 3.0 RC2, which brings a number of bug fixes (no features).gerald2017-12-192-4/+4 * Update to Wine 3.0 RC1, the first release candidate of Wine 3.0.gerald2017-12-094-48/+10 * Actually commit the following, which I had omitted from revision 455277:gerald2017-12-021-0/+1 * Update to Wine 2.22. This includes the following changes:gerald2017-12-014-6/+51 * The Wine Staging patchset finally became available for this version, sogerald2017-11-232-2/+3 * Explicitly add x11 and xext to USE_XORG (when the X11 option is set),gerald2017-11-191-1/+1 * Update to Wine 2.21. This includes the following changes:gerald2017-11-153-7/+7 * Fix pkg-plist for the MPG123 option -- where a different dynamicgerald2017-11-151-2/+2 * The Staging patchset now became available for Wine 2.20, so unbreakgerald2017-11-072-2/+3 * Update to Wine 2.20. This includes the following changes:gerald2017-11-054-20/+15 * Update to Wine 2.19. This includes the following changes:gerald2017-10-213-7/+9 * include/wine/windows/d3d11_2, include/wine/windows/d3d11_3 andgerald2017-10-132-7/+7 * Use ${GREP}, ${SED}, and ${PRINTF} instead of their direct brethren.gerald2017-10-13