src/protocols/msn/transaction.c

changeset 10284
257978b5df5b
parent 10225
0dfea1bc8695
child 10403
4647a87ef73b
equal deleted inserted replaced
10283:261443b20679 10284:257978b5df5b
73 73
74 g_queue_free(trans->queue); 74 g_queue_free(trans->queue);
75 } 75 }
76 #endif 76 #endif
77 77
78 if (trans->callbacks != NULL && trans->has_custom_callbacks)
79 g_hash_table_destroy(trans->callbacks);
80
78 if (trans->timer) 81 if (trans->timer)
79 gaim_timeout_remove(trans->timer); 82 gaim_timeout_remove(trans->timer);
80 83
81 g_free(trans); 84 g_free(trans);
82 } 85 }
165 { 168 {
166 g_return_if_fail(trans != NULL); 169 g_return_if_fail(trans != NULL);
167 g_return_if_fail(answer != NULL); 170 g_return_if_fail(answer != NULL);
168 171
169 if (trans->callbacks == NULL) 172 if (trans->callbacks == NULL)
170 trans->callbacks = g_hash_table_new_full(g_str_hash, g_str_equal, NULL, NULL); 173 {
174 trans->has_custom_callbacks = TRUE;
175 trans->callbacks = g_hash_table_new_full(g_str_hash, g_str_equal, NULL,
176 NULL);
177 }
178 else if (trans->has_custom_callbacks != TRUE)
179 g_return_if_reached ();
171 180
172 g_hash_table_insert(trans->callbacks, answer, cb); 181 g_hash_table_insert(trans->callbacks, answer, cb);
173 } 182 }
174 183
175 static gboolean 184 static gboolean

mercurial