Commit 6d4c776f authored by stesie's avatar stesie

care for the first alternative of a SilcMime bundle with multipart/alternative content-type

parent 7014bed1
......@@ -5,6 +5,7 @@
Author: Pekka Riikonen <>
Copyright (C) 2006 Pekka Riikonen
Copyright (C) 2007 Stefan Siegl <>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -65,10 +66,12 @@ si_process_mime(SilcClient client, SilcClientConnection conn,
if (silc_mime_is_multipart(mime)) {
SilcMime p;
const char *mtype;
int is_alternative;
SilcDList parts = silc_mime_get_multiparts(mime, &mtype);
/* Only "mixed" type supported */
if (strcmp(mtype, "mixed"))
is_alternative = strcmp(mtype, "alternative") == 0;
if (!is_alternative && strcmp(mtype, "mixed"))
goto out;
......@@ -76,6 +79,11 @@ si_process_mime(SilcClient client, SilcClientConnection conn,
/* Recursively process parts */
si_process_mime(client, conn, sender, channel, payload,
key, flags, p, TRUE);
/* Content-type set to multipart/alternative,
* handle the first alternative only */
goto out;
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment