aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-format.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/em-format.c')
-rw-r--r--mail/em-format.c42
1 files changed, 22 insertions, 20 deletions
diff --git a/mail/em-format.c b/mail/em-format.c
index 826ef11b63..b2360bb2fc 100644
--- a/mail/em-format.c
+++ b/mail/em-format.c
@@ -85,6 +85,8 @@ enum {
EMF_LAST_SIGNAL
};
+extern CamelSession *session;
+
static guint emf_signals[EMF_LAST_SIGNAL];
static GObjectClass *emf_parent;
@@ -220,7 +222,7 @@ em_format_class_add_handler(EMFormatClass *emfc, EMFormatHandler *info)
{
d(printf("adding format handler to '%s' '%s'\n", g_type_name_from_class((GTypeClass *)emfc), info->mime_type));
info->old = g_hash_table_lookup(emfc->type_handlers, info->mime_type);
- g_hash_table_insert(emfc->type_handlers, info->mime_type, info);
+ g_hash_table_insert(emfc->type_handlers, (gpointer) info->mime_type, info);
}
struct _class_handlers {
@@ -274,7 +276,7 @@ em_format_class_remove_handler(EMFormatClass *emfc, EMFormatHandler *info)
if (current == info) {
current = info->old;
if (current)
- g_hash_table_insert(emfc->type_handlers, current->mime_type, current);
+ g_hash_table_insert(emfc->type_handlers, (gpointer) current->mime_type, current);
else
g_hash_table_remove(emfc->type_handlers, info->mime_type);
} else {
@@ -1213,7 +1215,6 @@ emf_application_xpkcs7mime(EMFormat *emf, CamelStream *stream, CamelMimePart *pa
{
CamelCipherContext *context;
CamelException *ex;
- extern CamelSession *session;
CamelMimePart *opart;
CamelCipherValidity *valid;
struct _EMFormatCache *emfc;
@@ -1494,8 +1495,9 @@ emf_multipart_related(EMFormat *emf, CamelStream *stream, CamelMimePart *part, c
if (puri->func == emf_write_related) {
g_string_printf(emf->part_id, "%s", puri->part_id);
em_format_part(emf, stream, puri->part);
- } else
+ } else {
d(printf("unreferenced uri generated by format code: %s\n", puri->uri?puri->uri:puri->cid));
+ }
}
puri = purin;
purin = purin->next;
@@ -1732,28 +1734,28 @@ emf_inlinepgp_encrypted(EMFormat *emf, CamelStream *stream, CamelMimePart *ipart
static EMFormatHandler type_builtin_table[] = {
#ifdef ENABLE_SMIME
- { "application/x-pkcs7-mime", (EMFormatFunc)emf_application_xpkcs7mime, EM_FORMAT_HANDLER_INLINE_DISPOSITION },
+ { (gchar *) "application/x-pkcs7-mime", (EMFormatFunc)emf_application_xpkcs7mime, EM_FORMAT_HANDLER_INLINE_DISPOSITION },
#endif
- { "multipart/alternative", emf_multipart_alternative },
- { "multipart/appledouble", emf_multipart_appledouble },
- { "multipart/encrypted", emf_multipart_encrypted },
- { "multipart/mixed", emf_multipart_mixed },
- { "multipart/signed", emf_multipart_signed },
- { "multipart/related", emf_multipart_related },
- { "multipart/*", emf_multipart_mixed },
- { "message/rfc822", emf_message_rfc822, EM_FORMAT_HANDLER_INLINE },
- { "message/news", emf_message_rfc822, EM_FORMAT_HANDLER_INLINE },
- { "message/delivery-status", emf_message_deliverystatus },
- { "message/*", emf_message_rfc822, EM_FORMAT_HANDLER_INLINE },
+ { (gchar *) "multipart/alternative", emf_multipart_alternative },
+ { (gchar *) "multipart/appledouble", emf_multipart_appledouble },
+ { (gchar *) "multipart/encrypted", emf_multipart_encrypted },
+ { (gchar *) "multipart/mixed", emf_multipart_mixed },
+ { (gchar *) "multipart/signed", emf_multipart_signed },
+ { (gchar *) "multipart/related", emf_multipart_related },
+ { (gchar *) "multipart/*", emf_multipart_mixed },
+ { (gchar *) "message/rfc822", emf_message_rfc822, EM_FORMAT_HANDLER_INLINE },
+ { (gchar *) "message/news", emf_message_rfc822, EM_FORMAT_HANDLER_INLINE },
+ { (gchar *) "message/delivery-status", emf_message_deliverystatus },
+ { (gchar *) "message/*", emf_message_rfc822, EM_FORMAT_HANDLER_INLINE },
/* Insert brokenly-named parts here */
#ifdef ENABLE_SMIME
- { "application/pkcs7-mime", (EMFormatFunc)emf_application_xpkcs7mime, EM_FORMAT_HANDLER_INLINE_DISPOSITION },
+ { (gchar *) "application/pkcs7-mime", (EMFormatFunc)emf_application_xpkcs7mime, EM_FORMAT_HANDLER_INLINE_DISPOSITION },
#endif
/* internal types */
- { "application/x-inlinepgp-signed", (EMFormatFunc)emf_inlinepgp_signed },
- { "application/x-inlinepgp-encrypted", (EMFormatFunc)emf_inlinepgp_encrypted },
+ { (gchar *) "application/x-inlinepgp-signed", (EMFormatFunc)emf_inlinepgp_signed },
+ { (gchar *) "application/x-inlinepgp-encrypted", (EMFormatFunc)emf_inlinepgp_encrypted },
};
static void
@@ -1762,5 +1764,5 @@ emf_builtin_init(EMFormatClass *klass)
int i;
for (i=0;i<sizeof(type_builtin_table)/sizeof(type_builtin_table[0]);i++)
- g_hash_table_insert(klass->type_handlers, type_builtin_table[i].mime_type, &type_builtin_table[i]);
+ g_hash_table_insert(klass->type_handlers, (gpointer) type_builtin_table[i].mime_type, &type_builtin_table[i]);
}