# HG changeset patch # User Sadrul Habib Chowdhury # Date 1188335848 0 # Node ID b62683f4120d4c8ee9dfa95e15f00e7f1aca8d79 # Parent 7b348650524eb947c955dc83615bc3127483ef67 There's some disagreement over the response-id sent to the callbacks to purple_request_action. The best fix is to not use the same callback. Fix this so when I click 'Yes', purple doesn't think I REJECTED the certification. diff -r 7b348650524e -r b62683f4120d libpurple/certificate.c --- a/libpurple/certificate.c Tue Aug 28 21:03:49 2007 +0000 +++ b/libpurple/certificate.c Tue Aug 28 21:17:28 2007 +0000 @@ -1124,6 +1124,18 @@ } } +static void +x509_tls_cached_user_auth_accept_cb(x509_tls_cached_ua_ctx *c, gint ignore) +{ + x509_tls_cached_user_auth_cb(c, 2); +} + +static void +x509_tls_cached_user_auth_reject_cb(x509_tls_cached_ua_ctx *c, gint ignore) +{ + x509_tls_cached_user_auth_cb(c, 1); +} + /** Validates a certificate by asking the user * @param reason String to explain why the user needs to accept/refuse the * certificate. @@ -1151,8 +1163,8 @@ NULL, /* No associated conversation */ x509_tls_cached_ua_ctx_new(vrq, reason), 3, /* Number of actions */ - _("Yes"), x509_tls_cached_user_auth_cb, - _("No"), x509_tls_cached_user_auth_cb, + _("Yes"), x509_tls_cached_user_auth_accept_cb, + _("No"), x509_tls_cached_user_auth_reject_cb, _("_View Certificate..."), x509_tls_cached_show_cert); /* Cleanup */