Mercurial > pidgin
comparison libpurple/plugins/ssl/ssl-gnutls.c @ 19551:ce3dec442fec
Replace a call to g_assert() with a logging statement
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 30 Aug 2007 07:40:27 +0000 |
parents | 0a6ed4e36ca8 |
children | c35c3c3fc4cf |
comparison
equal
deleted
inserted
replaced
19550:0a6ed4e36ca8 | 19551:ce3dec442fec |
---|---|
424 } | 424 } |
425 | 425 |
426 static void | 426 static void |
427 x509_crtdata_delref(x509_crtdata_t *cd) | 427 x509_crtdata_delref(x509_crtdata_t *cd) |
428 { | 428 { |
429 g_assert(cd->refcount > 0); | |
430 | |
431 (cd->refcount)--; | 429 (cd->refcount)--; |
432 | 430 |
431 if (cd->refcount <= 0) | |
432 g_critical("Refcount of x509_crtdata_t is %d, which is less " | |
433 "than zero!\n", cd->refcount); | |
434 | |
433 /* If the refcount reaches zero, kill the structure */ | 435 /* If the refcount reaches zero, kill the structure */ |
434 if (cd->refcount == 0) { | 436 if (cd->refcount <= 0) { |
435 purple_debug_info("gnutls/x509", | 437 purple_debug_info("gnutls/x509", |
436 "Freeing unused cert data at %p\n", | 438 "Freeing unused cert data at %p\n", |
437 cd); | 439 cd); |
438 /* Kill the internal data */ | 440 /* Kill the internal data */ |
439 gnutls_x509_crt_deinit( cd->crt ); | 441 gnutls_x509_crt_deinit( cd->crt ); |