2003-04-30  Not Zed  <NotZed@Ximian.com>

        ** See bug #41748

        * mail-send-recv.c (build_dialogue): make sure we dont add any
        SEND_SEND types to the receive table.  When we add the SEND_SEND
        type, key it on a fixed string SEND_URI_KEY.
        (receive_done): if it is a SEND_SEND type, use SEND_URI_KEY to
        remove it from the active list.
        (mail_receive_uri): make sure we never add a SEND_SEND type to the
        receive list.
        (mail_send): key the send info on SEND_URI_KEY not transport url.

svn path=/trunk/; revision=21038
This commit is contained in:
Not Zed
2003-05-01 02:19:46 +00:00
committed by Michael Zucci
parent f2a740bdaa
commit d5ab5576f2
2 changed files with 26 additions and 7 deletions

View File

@ -1,3 +1,16 @@
2003-04-30 Not Zed <NotZed@Ximian.com>
** See bug #41748
* mail-send-recv.c (build_dialogue): make sure we dont add any
SEND_SEND types to the receive table. When we add the SEND_SEND
type, key it on a fixed string SEND_URI_KEY.
(receive_done): if it is a SEND_SEND type, use SEND_URI_KEY to
remove it from the active list.
(mail_receive_uri): make sure we never add a SEND_SEND type to the
receive list.
(mail_send): key the send info on SEND_URI_KEY not transport url.
2003-04-29 Jeremy Katz <katzj@redhat.com>
* folder-browser-ui.c (fbui_sensitise_item): Don't just blindly

View File

@ -57,6 +57,9 @@
/* ms between status updates to the gui */
#define STATUS_TIMEOUT (250)
/* pseudo-uri to key the send task on */
#define SEND_URI_KEY "send-task:"
/* send/receive email */
/* ********************************************************************** */
@ -347,7 +350,7 @@ build_dialogue (EAccountList *accounts, CamelFolder *outbox, const char *destina
send_info_t type;
type = get_receive_type (source->url);
if (type == SEND_INVALID) {
if (type == SEND_INVALID || type == SEND_SEND) {
e_iterator_next (iter);
continue;
}
@ -413,7 +416,7 @@ build_dialogue (EAccountList *accounts, CamelFolder *outbox, const char *destina
gtk_widget_show_all (GTK_WIDGET (table));
if (outbox && destination) {
info = g_hash_table_lookup (data->active, destination);
info = g_hash_table_lookup (data->active, SEND_URI_KEY);
if (info == NULL) {
info = g_malloc0 (sizeof (*info));
info->type = SEND_SEND;
@ -425,7 +428,7 @@ build_dialogue (EAccountList *accounts, CamelFolder *outbox, const char *destina
info->state = SEND_ACTIVE;
info->timeout_id = gtk_timeout_add (STATUS_TIMEOUT, operation_status_timeout, info);
g_hash_table_insert (data->active, info->uri, info);
g_hash_table_insert (data->active, SEND_URI_KEY, info);
list = g_list_prepend (list, info);
} else if (info->timeout_id == 0)
info->timeout_id = gtk_timeout_add (STATUS_TIMEOUT, operation_status_timeout, info);
@ -583,7 +586,10 @@ receive_done (char *uri, void *data)
/* remove/free this active download */
d(printf("%s: freeing info %p\n", G_GNUC_FUNCTION, info));
g_hash_table_remove(info->data->active, info->uri);
if (info->type == SEND_SEND)
g_hash_table_remove(info->data->active, SEND_URI_KEY);
else
g_hash_table_remove(info->data->active, info->uri);
info->data->infos = g_list_remove(info->data->infos, info);
if (g_hash_table_size(info->data->active) == 0) {
@ -853,7 +859,7 @@ mail_receive_uri (const char *uri, int keep)
d(printf("starting non-interactive download of '%s'\n", uri));
type = get_receive_type (uri);
if (type == SEND_INVALID) {
if (type == SEND_INVALID || type == SEND_SEND) {
d(printf ("unsupported provider: '%s'\n", uri));
return;
}
@ -915,7 +921,7 @@ mail_send (void)
return;
data = setup_send_data ();
info = g_hash_table_lookup (data->active, transport->url);
info = g_hash_table_lookup (data->active, SEND_URI_KEY);
if (info != NULL) {
d(printf("send of %s still in progress\n", transport->url));
return;
@ -943,7 +949,7 @@ mail_send (void)
d(printf("Adding new info %p\n", info));
g_hash_table_insert (data->active, info->uri, info);
g_hash_table_insert (data->active, SEND_URI_KEY, info);
/* todo, store the folder in info? */
mail_send_queue (outbox_folder, info->uri,