Fri, 27 Jul 2007 07:33:52 +0000
- Only emit certificate-stored and certificate-deleted if the operation
succeeds
| libpurple/certificate.c | file | annotate | diff | comparison | revisions |
--- 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; }