+static gboolean
+part_cids_equal (const gchar *part_cid1,
+ const gchar *part_cid2)
+{
+ if (g_strcmp0 (part_cid1, part_cid2) == 0)
+ return TRUE;
+
+ if (part_cid2 && part_cid2[0] == '<') {
+ const gchar *end;
+ end = g_strrstr_len (part_cid2, -1, ">");
+
+ if (end && strncmp (part_cid2 + 1, part_cid1, end - part_cid2 - 1) == 0)
+ return TRUE;
+ }
+ return FALSE;
+}