Commit 895f347c authored by Jeffrey Stedfast's avatar Jeffrey Stedfast Committed by Jeffrey Stedfast
Browse files

Rearranged some error checking code to fix bug #56405.

2004-04-13  Jeffrey Stedfast  <fejj@ximian.com>

	* providers/imap/camel-imap-store.c (get_folder_online):
	Rearranged some error checking code to fix bug #56405.
parent 67621302
2004-04-13 Jeffrey Stedfast <fejj@ximian.com>
* providers/imap/camel-imap-store.c (get_folder_online):
Rearranged some error checking code to fix bug #56405.
2004-04-13 Not Zed <NotZed@Ximian.com>
* camel-folder.c (folder_getv): implement the new counts, and get
......
......@@ -524,8 +524,7 @@ connect_to_server (CamelService *service, int ssl_mode, int try_starttls, CamelE
int port, ret;
char *buf;
h = camel_service_gethost (service, ex);
if (!h)
if (!(h = camel_service_gethost (service, ex)))
return FALSE;
port = service->url->port ? service->url->port : 143;
......@@ -1791,7 +1790,14 @@ get_folder_online (CamelStore *store, const char *folder_name, guint32 flags, Ca
return NULL;
}
c = folder_name;
if ((parent_name = strrchr (folder_name, '/'))) {
parent_name = g_strndup (folder_name, parent_name - folder_name);
parent_real = camel_imap_store_summary_path_to_full (imap_store->summary, parent_name, store->dir_sep);
} else {
parent_real = NULL;
}
c = parent_name ? parent_name : folder_name;
while (*c && *c != imap_store->dir_sep && !strchr ("#%*", *c))
c++;
......@@ -1800,16 +1806,11 @@ get_folder_online (CamelStore *store, const char *folder_name, guint32 flags, Ca
camel_exception_setv (ex, CAMEL_EXCEPTION_FOLDER_INVALID_PATH,
_("The folder name \"%s\" is invalid because it contains the character \"%c\""),
folder_name, *c);
g_free (parent_name);
g_free (parent_real);
return NULL;
}
if ((parent_name = strrchr (folder_name, '/'))) {
parent_name = g_strndup (folder_name, parent_name - folder_name);
parent_real = camel_imap_store_summary_path_to_full (imap_store->summary, parent_name, store->dir_sep);
} else {
parent_real = NULL;
}
if (parent_real != NULL) {
gboolean need_convert = FALSE;
char *resp, *thisone;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment