# HG changeset patch # User William Ehlhardt # Date 1185521632 0 # Node ID c563b8f84aa0799ae66cfccdcc235392e305bb00 # Parent 8cbc110456ac5f6670e8769ed7858e2115adfbb6 - Only emit certificate-stored and certificate-deleted if the operation succeeds diff -r 8cbc110456ac -r c563b8f84aa0 libpurple/certificate.c --- a/libpurple/certificate.c Fri Jul 27 07:31:47 2007 +0000 +++ b/libpurple/certificate.c Fri Jul 27 07:33:52 2007 +0000 @@ -338,9 +338,11 @@ ret = (pool->put_cert)(id, crt); - /* Signal that the certificate was stored */ - purple_signal_emit(pool, "certificate-stored", - pool, id); + /* Signal that the certificate was stored if success*/ + if (ret) { + purple_signal_emit(pool, "certificate-stored", + pool, id); + } return ret; } @@ -356,9 +358,11 @@ ret = (pool->delete_cert)(id); - /* Signal that the certificate was deleted */ - purple_signal_emit(pool, "certificate-deleted", - pool, id); + /* Signal that the certificate was deleted if success */ + if (ret) { + purple_signal_emit(pool, "certificate-deleted", + pool, id); + } return ret; }