comparison src/cipher.c @ 13758:ff94569010f5

[gaim-migrate @ 16169] This should eliminate an assertion failure when the cipher code initializes and you're using Dbus. The cipher code was not registering the cipher with Dbus. It's all good, brother. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Wed, 10 May 2006 02:27:09 +0000
parents 89ceef5203ac
children 8bda65b88e49
comparison
equal deleted inserted replaced
13757:164932c4d050 13758:ff94569010f5
54 #include <string.h> 54 #include <string.h>
55 #include <stdio.h> 55 #include <stdio.h>
56 56
57 #include "internal.h" 57 #include "internal.h"
58 #include "cipher.h" 58 #include "cipher.h"
59 #include "dbus-maybe.h"
59 #include "debug.h" 60 #include "debug.h"
60 #include "signals.h" 61 #include "signals.h"
61 #include "value.h" 62 #include "value.h"
62 63
63 /******************************************************************************* 64 /*******************************************************************************
1378 g_return_val_if_fail(name, NULL); 1379 g_return_val_if_fail(name, NULL);
1379 g_return_val_if_fail(ops, NULL); 1380 g_return_val_if_fail(ops, NULL);
1380 g_return_val_if_fail(!gaim_ciphers_find_cipher(name), NULL); 1381 g_return_val_if_fail(!gaim_ciphers_find_cipher(name), NULL);
1381 1382
1382 cipher = g_new0(GaimCipher, 1); 1383 cipher = g_new0(GaimCipher, 1);
1384 GAIM_DBUS_REGISTER_POINTER(cipher, GaimCipher);
1383 1385
1384 cipher->name = g_strdup(name); 1386 cipher->name = g_strdup(name);
1385 cipher->ops = ops; 1387 cipher->ops = ops;
1386 1388
1387 ciphers = g_list_append(ciphers, cipher); 1389 ciphers = g_list_append(ciphers, cipher);
1399 gaim_signal_emit(gaim_ciphers_get_handle(), "cipher-removed", cipher); 1401 gaim_signal_emit(gaim_ciphers_get_handle(), "cipher-removed", cipher);
1400 1402
1401 ciphers = g_list_remove(ciphers, cipher); 1403 ciphers = g_list_remove(ciphers, cipher);
1402 1404
1403 g_free(cipher->name); 1405 g_free(cipher->name);
1406
1407 GAIM_DBUS_UNREGISTER_POINTER(cipher);
1404 g_free(cipher); 1408 g_free(cipher);
1405 1409
1406 return TRUE; 1410 return TRUE;
1407 } 1411 }
1408 1412