Mercurial > pidgin.yaz
diff src/protocols/yahoo/yahoo_picture.c @ 10392:a8f9e5ce4f92
[gaim-migrate @ 11620]
a little bit of clean up and reorganization of the yahoo prpl.
I moved the packet functions to their own file, renamed a couple of them,
added a convience function and used it a lot. I plan on adding several
more convience functions.
committer: Tailor Script <tailor@pidgin.im>
author | Tim Ringenbach <marv@pidgin.im> |
---|---|
date | Thu, 16 Dec 2004 21:47:54 +0000 |
parents | 8490f2e292a6 |
children | 45a0a07e8b25 |
line wrap: on
line diff
--- a/src/protocols/yahoo/yahoo_picture.c Thu Dec 16 15:36:49 2004 +0000 +++ b/src/protocols/yahoo/yahoo_picture.c Thu Dec 16 21:47:54 2004 +0000 @@ -32,6 +32,7 @@ #include "util.h" #include "yahoo.h" +#include "yahoo_packet.h" #include "yahoo_friend.h" #include "yahoo_picture.h" @@ -247,8 +248,7 @@ buf = g_strdup_printf("%d", yd->picture_checksum); yahoo_packet_hash(pkt, 192, buf); - yahoo_send_packet(yd, pkt); - yahoo_packet_free(pkt); + yahoo_packet_send_and_free(pkt, yd); g_free(buf); } @@ -261,8 +261,7 @@ yahoo_packet_hash(pkt, 4, gaim_connection_get_display_name(gc)); /* me */ yahoo_packet_hash(pkt, 5, who); /* the other guy */ yahoo_packet_hash(pkt, 13, "1"); /* 1 = request, 2 = reply */ - yahoo_send_packet(yd, pkt); - yahoo_packet_free(pkt); + yahoo_packet_send_and_free(pkt, yd); } void yahoo_send_picture_checksum(GaimConnection *gc) @@ -275,8 +274,7 @@ yahoo_packet_hash(pkt, 1, gaim_connection_get_display_name(gc)); yahoo_packet_hash(pkt, 212, "1"); yahoo_packet_hash(pkt, 192, cksum); - yahoo_send_packet(yd, pkt); - yahoo_packet_free(pkt); + yahoo_packet_send_and_free(pkt, yd); g_free(cksum); } @@ -290,8 +288,7 @@ yahoo_packet_hash(pkt, 1, gaim_connection_get_display_name(gc)); yahoo_packet_hash(pkt, 5, who); yahoo_packet_hash(pkt, 206, typestr); - yahoo_send_packet(yd, pkt); - yahoo_packet_free(pkt); + yahoo_packet_send_and_free(pkt, yd); g_free(typestr); } @@ -432,7 +429,7 @@ buf); write(d->fd, post, strlen(post)); - yahoo_send_packet_special(d->fd, pkt, 8); + yahoo_packet_send_special(pkt, d->fd, 8); yahoo_packet_free(pkt); write(d->fd, "29\xc0\x80", 4);