Mercurial > pidgin
diff src/protocols/oscar/flap_connection.c @ 13609:5796551db930
[gaim-migrate @ 15995]
Inline FlapConnection->inside and change some functions to return
void instead of a meaningless int
committer: Tailor Script <tailor@pidgin.im>
| author | Mark Doliner <mark@kingant.net> |
|---|---|
| date | Mon, 10 Apr 2006 03:53:05 +0000 |
| parents | 6c34fbb75bbd |
| children | 060835af7634 |
line wrap: on
line diff
--- a/src/protocols/oscar/flap_connection.c Mon Apr 10 03:37:37 2006 +0000 +++ b/src/protocols/oscar/flap_connection.c Mon Apr 10 03:53:05 2006 +0000 @@ -119,7 +119,6 @@ conn = g_new0(FlapConnection, 1); conn->od = od; conn->buffer_outgoing = gaim_circ_buffer_new(0); - conn->inside = g_new0(aim_conn_inside_t, 1); conn->fd = -1; conn->subtype = -1; conn->type = type; @@ -152,16 +151,7 @@ conn->internal = src->internal; conn->lastactivity = src->lastactivity; - if (src->inside != NULL) - { - /* - * XXX should clone this section as well, but since currently - * this function only gets called for some of that rendezvous - * crap, and not on SNAC connections, its probably okay for - * now. - * - */ - } + /* TODO: Clone groups and rates */ return conn; } @@ -253,15 +243,8 @@ if (conn->type == SNAC_FAMILY_CHAT) flap_connection_destroy_chat(od, conn); - if (conn->inside != NULL) - { - aim_conn_inside_t *inside = (aim_conn_inside_t *)conn->inside; - - flap_connection_destroy_snacgroups(inside->groups); - flap_connection_destroy_rates(inside->rates); - - free(inside); - } + flap_connection_destroy_snacgroups(conn->groups); + flap_connection_destroy_rates(conn->rates); od->oscar_connections = g_list_remove(od->oscar_connections, conn); g_free(conn); @@ -375,7 +358,6 @@ void flap_connection_addgroup(FlapConnection *conn, guint16 group) { - aim_conn_inside_t *ins = (aim_conn_inside_t *)conn->inside; struct snacgroup *sg; sg = g_new0(struct snacgroup, 1); @@ -384,8 +366,8 @@ "of type 0x%04hx\n", group, conn->type); sg->group = group; - sg->next = ins->groups; - ins->groups = sg; + sg->next = conn->groups; + conn->groups = sg; } /** @@ -402,13 +384,11 @@ for (cur = od->oscar_connections; cur != NULL; cur = cur->next) { FlapConnection *conn; - aim_conn_inside_t *ins; struct snacgroup *sg; conn = cur->data; - ins = (aim_conn_inside_t *)conn->inside; - for (sg = ins->groups; sg != NULL; sg = sg->next) + for (sg = conn->groups; sg != NULL; sg = sg->next) { if (sg->group == group) return conn;
