From a764639cd2f9f85da377fa6987c10bc1005d74ef Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Thu, 27 Mar 2003 21:13:13 +0000 Subject: Get rid of debug printf's that are no longer needed. In the case of 2003-03-27 Jeffrey Stedfast * camel-sasl-gssapi.c (gssapi_challenge): Get rid of debug printf's that are no longer needed. In the case of errors, don't release the outbuf gss_buffer_t since it shouldn't be set. Also g_free (str) when we are done with it. svn path=/trunk/; revision=20551 --- camel/ChangeLog | 5 +++++ camel/camel-sasl-gssapi.c | 12 +++--------- 2 files changed, 8 insertions(+), 9 deletions(-) (limited to 'camel') diff --git a/camel/ChangeLog b/camel/ChangeLog index da1b36d2ec..edb63918f7 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,5 +1,10 @@ 2003-03-27 Jeffrey Stedfast + * camel-sasl-gssapi.c (gssapi_challenge): Get rid of debug + printf's that are no longer needed. In the case of errors, don't + release the outbuf gss_buffer_t since it shouldn't be set. Also + g_free (str) when we are done with it. + * camel-mime-utils.c (header_encode_phrase_merge_words): When we remove a node from the list, make sure to g_list_free_1(). (header_encode_phrase_merge_words): Don't use diff --git a/camel/camel-sasl-gssapi.c b/camel/camel-sasl-gssapi.c index bbdb1b86ec..9faa1d8091 100644 --- a/camel/camel-sasl-gssapi.c +++ b/camel/camel-sasl-gssapi.c @@ -34,6 +34,7 @@ #include #else /* HAVE_HEIMDAL_KRB5 */ #include +#define gss_nt_service_name GSS_C_NT_HOSTBASED_SERVICE #endif #include @@ -215,7 +216,6 @@ gssapi_challenge (CamelSasl *sasl, GByteArray *token, CamelException *ex) } str = g_strdup_printf ("%s@%s", sasl->service_name, h->h_name); - printf ("FQDN: %s (%s)\n", h->h_name, str); camel_free_host (h); inbuf.value = str; @@ -259,8 +259,6 @@ gssapi_challenge (CamelSasl *sasl, GByteArray *token, CamelException *ex) break; default: gssapi_set_exception (major, minor, ex); - printf ("gss_init_sec_context() exception\n"); - gss_release_buffer (&minor, &outbuf); return NULL; } @@ -281,8 +279,6 @@ gssapi_challenge (CamelSasl *sasl, GByteArray *token, CamelException *ex) major = gss_unwrap (&minor, priv->ctx, &inbuf, &outbuf, &conf_state, &qop); if (major != GSS_S_COMPLETE) { gssapi_set_exception (major, minor, ex); - printf ("gss_unwrap() exception\n"); - gss_release_buffer (&minor, &outbuf); return NULL; } @@ -309,14 +305,13 @@ gssapi_challenge (CamelSasl *sasl, GByteArray *token, CamelException *ex) gss_release_buffer (&minor, &outbuf); major = gss_wrap (&minor, priv->ctx, FALSE, qop, &inbuf, &conf_state, &outbuf); - if (major != 0) { + if (major != GSS_S_COMPLETE) { gssapi_set_exception (major, minor, ex); - printf ("gss_wrap() exception\n"); - gss_release_buffer (&minor, &outbuf); g_free (str); return NULL; } + g_free (str); challenge = g_byte_array_new (); g_byte_array_append (challenge, outbuf.value, outbuf.length); gss_release_buffer (&minor, &outbuf); @@ -326,7 +321,6 @@ gssapi_challenge (CamelSasl *sasl, GByteArray *token, CamelException *ex) sasl->authenticated = TRUE; break; default: - printf ("unknown state exception\n"); return NULL; } -- cgit v1.2.3