Mercurial > pidgin
comparison libpurple/protocols/oscar/oscar_data.c @ 30904:91d3b40a2f70
No need to clutter the debug log with dozens of lines when
the information can fit on one, increasing readability.
author | ivan.komarov@soc.pidgin.im |
---|---|
date | Fri, 05 Nov 2010 00:37:23 +0000 |
parents | 5661f30d1b8e |
children | 8d6630912021 |
comparison
equal
deleted
inserted
replaced
30903:f8f853ab3aba | 30904:91d3b40a2f70 |
---|---|
35 */ | 35 */ |
36 OscarData * | 36 OscarData * |
37 oscar_data_new(void) | 37 oscar_data_new(void) |
38 { | 38 { |
39 OscarData *od; | 39 OscarData *od; |
40 aim_module_t *cur; | |
41 GString *msg; | |
40 | 42 |
41 od = g_new0(OscarData, 1); | 43 od = g_new0(OscarData, 1); |
42 | 44 |
43 aim_initsnachash(od); | 45 aim_initsnachash(od); |
44 od->snacid_next = 0x00000001; | 46 od->snacid_next = 0x00000001; |
67 aim__registermodule(od, icq_modfirst); | 69 aim__registermodule(od, icq_modfirst); |
68 /* missing 0x16 */ | 70 /* missing 0x16 */ |
69 /* auth_modfirst is only needed if we're connecting with the old-style BUCP login */ | 71 /* auth_modfirst is only needed if we're connecting with the old-style BUCP login */ |
70 aim__registermodule(od, auth_modfirst); | 72 aim__registermodule(od, auth_modfirst); |
71 aim__registermodule(od, email_modfirst); | 73 aim__registermodule(od, email_modfirst); |
74 | |
75 msg = g_string_new("Registered modules: "); | |
76 for (cur = od->modlistv; cur; cur = cur->next) { | |
77 g_string_append_printf( | |
78 msg, | |
79 "%s (family=0x%04x, version=0x%04x, toolid=0x%04x, toolversion=0x%04x), ", | |
80 cur->name, | |
81 cur->family, | |
82 cur->version, | |
83 cur->toolid, | |
84 cur->toolversion); | |
85 } | |
86 purple_debug_misc("oscar", "%s\n", msg->str); | |
87 g_string_free(msg, TRUE); | |
72 | 88 |
73 return od; | 89 return od; |
74 } | 90 } |
75 | 91 |
76 /** | 92 /** |
116 void | 132 void |
117 oscar_data_addhandler(OscarData *od, guint16 family, guint16 subtype, aim_rxcallback_t newhandler, guint16 flags) | 133 oscar_data_addhandler(OscarData *od, guint16 family, guint16 subtype, aim_rxcallback_t newhandler, guint16 flags) |
118 { | 134 { |
119 SnacHandler *snac_handler; | 135 SnacHandler *snac_handler; |
120 | 136 |
121 purple_debug_misc("oscar", "Adding handler for %04x/%04x\n", family, subtype); | |
122 | |
123 snac_handler = g_new0(SnacHandler, 1); | 137 snac_handler = g_new0(SnacHandler, 1); |
124 | 138 |
125 snac_handler->family = family; | 139 snac_handler->family = family; |
126 snac_handler->subtype = subtype; | 140 snac_handler->subtype = subtype; |
127 snac_handler->flags = flags; | 141 snac_handler->flags = flags; |