Mercurial > pidgin
comparison libgaim/protocols/oscar/peer.c @ 14348:80b05108652c
[gaim-migrate @ 17050]
Use GSList in a few places instead of GList, and use g_list_prepend
and then g_list_reverse in a few places instead of g_list_append
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sat, 26 Aug 2006 19:12:05 +0000 |
parents | 645598a4ec04 |
children | 648e33275d9d |
comparison
equal
deleted
inserted
replaced
14347:a8140cbe08ce | 14348:80b05108652c |
---|---|
69 #endif | 69 #endif |
70 | 70 |
71 PeerConnection * | 71 PeerConnection * |
72 peer_connection_find_by_type(OscarData *od, const char *sn, OscarCapability type) | 72 peer_connection_find_by_type(OscarData *od, const char *sn, OscarCapability type) |
73 { | 73 { |
74 GList *cur; | 74 GSList *cur; |
75 PeerConnection *conn; | 75 PeerConnection *conn; |
76 | 76 |
77 for (cur = od->peer_connections; cur != NULL; cur = cur->next) | 77 for (cur = od->peer_connections; cur != NULL; cur = cur->next) |
78 { | 78 { |
79 conn = cur->data; | 79 conn = cur->data; |
88 * @param cookie This must be exactly 8 characters. | 88 * @param cookie This must be exactly 8 characters. |
89 */ | 89 */ |
90 PeerConnection * | 90 PeerConnection * |
91 peer_connection_find_by_cookie(OscarData *od, const char *sn, const guchar *cookie) | 91 peer_connection_find_by_cookie(OscarData *od, const char *sn, const guchar *cookie) |
92 { | 92 { |
93 GList *cur; | 93 GSList *cur; |
94 PeerConnection *conn; | 94 PeerConnection *conn; |
95 | 95 |
96 for (cur = od->peer_connections; cur != NULL; cur = cur->next) | 96 for (cur = od->peer_connections; cur != NULL; cur = cur->next) |
97 { | 97 { |
98 conn = cur->data; | 98 conn = cur->data; |
124 if (type == OSCAR_CAPABILITY_DIRECTIM) | 124 if (type == OSCAR_CAPABILITY_DIRECTIM) |
125 memcpy(conn->magic, "ODC2", 4); | 125 memcpy(conn->magic, "ODC2", 4); |
126 else if (type == OSCAR_CAPABILITY_SENDFILE) | 126 else if (type == OSCAR_CAPABILITY_SENDFILE) |
127 memcpy(conn->magic, "OFT2", 4); | 127 memcpy(conn->magic, "OFT2", 4); |
128 | 128 |
129 od->peer_connections = g_list_prepend(od->peer_connections, conn); | 129 od->peer_connections = g_slist_prepend(od->peer_connections, conn); |
130 | 130 |
131 return conn; | 131 return conn; |
132 } | 132 } |
133 | 133 |
134 static void | 134 static void |
222 g_free(conn->proxyip); | 222 g_free(conn->proxyip); |
223 g_free(conn->clientip); | 223 g_free(conn->clientip); |
224 g_free(conn->verifiedip); | 224 g_free(conn->verifiedip); |
225 gaim_circ_buffer_destroy(conn->buffer_outgoing); | 225 gaim_circ_buffer_destroy(conn->buffer_outgoing); |
226 | 226 |
227 conn->od->peer_connections = g_list_remove(conn->od->peer_connections, conn); | 227 conn->od->peer_connections = g_slist_remove(conn->od->peer_connections, conn); |
228 | 228 |
229 g_free(conn); | 229 g_free(conn); |
230 | 230 |
231 return FALSE; | 231 return FALSE; |
232 } | 232 } |