Bug #624130 - Sasl::challenge reported failure without setting its GError
authorMilan Crha <mcrha@redhat.com>
Thu, 2 Sep 2010 11:27:58 +0000 (13:27 +0200)
committerMilan Crha <mcrha@redhat.com>
Thu, 2 Sep 2010 11:27:58 +0000 (13:27 +0200)
camel/camel-sasl.c

index 7e2da2b..8a616ce 100644 (file)
@@ -282,7 +282,8 @@ camel_sasl_challenge (CamelSasl *sasl,
        g_return_val_if_fail (class->challenge != NULL, NULL);
 
        response = class->challenge (sasl, token, error);
-       CAMEL_CHECK_GERROR (sasl, challenge, response != NULL, error);
+       if (token)
+               CAMEL_CHECK_GERROR (sasl, challenge, response != NULL, error);
 
        return response;
 }