Use g_strcasecmp() because some systems don't have strcasecmp(). Also,
authorJeffrey Stedfast <fejj@ximian.com>
Mon, 28 May 2001 18:47:24 +0000 (18:47 +0000)
committerJeffrey Stedfast <fejj@src.gnome.org>
Mon, 28 May 2001 18:47:24 +0000 (18:47 +0000)
2001-05-28  Jeffrey Stedfast  <fejj@ximian.com>

* camel-mime-utils.c (header_set_param): Use g_strcasecmp()
because some systems don't have strcasecmp(). Also, when removing
a param, make sure to free the param->name too.

camel/ChangeLog
camel/camel-mime-utils.c
camel/camel-pgp-mime.c

index 767224d..e09c053 100644 (file)
@@ -1,3 +1,9 @@
+2001-05-28  Jeffrey Stedfast  <fejj@ximian.com>
+
+       * camel-mime-utils.c (header_set_param): Use g_strcasecmp()
+       because some systems don't have strcasecmp(). Also, when removing
+       a param, make sure to free the param->name too.
+
 2001-05-27  Dan Winship  <danw@ximian.com>
 
        * tests/lib/messages.c (test_message_read_file): Fix an fd leak
index b8ac8aa..2686b99 100644 (file)
@@ -1778,13 +1778,14 @@ header_set_param(struct _header_param **l, const char *name, const char *value)
 
        while (p->next) {
                pn = p->next;
-               if (!strcasecmp(pn->name, name)) {
-                       g_free(pn->value);
+               if (!g_strcasecmp (pn->name, name)) {
+                       g_free (pn->value);
                        if (value) {
                                pn->value = g_strdup(value);
                                return pn;
                        } else {
                                p->next = pn->next;
+                               g_free (pn->name);
                                g_free(pn);
                                return NULL;
                        }
index ba91804..ce8071c 100644 (file)
@@ -54,7 +54,7 @@ camel_pgp_mime_is_rfc2015_signed (CamelMimePart *mime_part)
        if (!header_content_type_is (type, "multipart", "signed"))
                return FALSE;
        
-       /* check that we have a protocol param with the value: "application/pgp-signed" */
+       /* check that we have a protocol param with the value: "application/pgp-signature" */
        param = header_content_type_param (type, "protocol");
        if (!param || g_strcasecmp (param, "application/pgp-signature"))
                return FALSE;