comparison libpurple/certificate.c @ 19046:8599a27ad69c

- Emit certificate-stored signal in purple_certificate_pool_store
author William Ehlhardt <williamehlhardt@gmail.com>
date Fri, 27 Jul 2007 07:01:21 +0000
parents 602295db8e6b
children 3af5d9ed9ad3
comparison
equal deleted inserted replaced
19045:2aa5a9f47470 19046:8599a27ad69c
321 } 321 }
322 322
323 gboolean 323 gboolean
324 purple_certificate_pool_store(PurpleCertificatePool *pool, const gchar *id, PurpleCertificate *crt) 324 purple_certificate_pool_store(PurpleCertificatePool *pool, const gchar *id, PurpleCertificate *crt)
325 { 325 {
326 gboolean ret = FALSE;
327
326 g_return_val_if_fail(pool, FALSE); 328 g_return_val_if_fail(pool, FALSE);
327 g_return_val_if_fail(id, FALSE); 329 g_return_val_if_fail(id, FALSE);
328 g_return_val_if_fail(pool->put_cert, FALSE); 330 g_return_val_if_fail(pool->put_cert, FALSE);
329 331
330 /* TODO: Should this just be someone else's problem? */ 332 /* TODO: Should this just be someone else's problem? */
332 relevant... I think... */ 334 relevant... I think... */
333 g_return_val_if_fail( 335 g_return_val_if_fail(
334 g_ascii_strcasecmp(pool->scheme_name, crt->scheme->name) == 0, 336 g_ascii_strcasecmp(pool->scheme_name, crt->scheme->name) == 0,
335 FALSE); 337 FALSE);
336 338
337 return (pool->put_cert)(id, crt); 339 ret = (pool->put_cert)(id, crt);
340
341 /* Signal that the certificate was stored */
342 purple_signal_emit(pool, "certificate-stored",
343 pool, id);
344
345 return ret;
338 } 346 }
339 347
340 GList * 348 GList *
341 purple_certificate_pool_get_idlist(PurpleCertificatePool *pool) 349 purple_certificate_pool_get_idlist(PurpleCertificatePool *pool)
342 { 350 {