Mercurial > pidgin
comparison libpurple/protocols/msn/slplink.c @ 24402:b9e09053e53a
This doesn't matter, but I think the metaphor tends to be that you push
stuff onto the tail and pop stuff from the head
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 13 Nov 2008 08:46:37 +0000 |
parents | bceefbae1ca6 |
children | 89cb1c13036e |
comparison
equal
deleted
inserted
replaced
24401:bceefbae1ca6 | 24402:b9e09053e53a |
---|---|
398 void | 398 void |
399 msn_slplink_queue_slpmsg(MsnSlpLink *slplink, MsnSlpMessage *slpmsg) | 399 msn_slplink_queue_slpmsg(MsnSlpLink *slplink, MsnSlpMessage *slpmsg) |
400 { | 400 { |
401 slpmsg->id = slplink->slp_seq_id++; | 401 slpmsg->id = slplink->slp_seq_id++; |
402 | 402 |
403 g_queue_push_head(slplink->slp_msg_queue, slpmsg); | 403 g_queue_push_tail(slplink->slp_msg_queue, slpmsg); |
404 } | 404 } |
405 | 405 |
406 void | 406 void |
407 msn_slplink_send_slpmsg(MsnSlpLink *slplink, MsnSlpMessage *slpmsg) | 407 msn_slplink_send_slpmsg(MsnSlpLink *slplink, MsnSlpMessage *slpmsg) |
408 { | 408 { |
415 msn_slplink_send_queued_slpmsgs(MsnSlpLink *slplink) | 415 msn_slplink_send_queued_slpmsgs(MsnSlpLink *slplink) |
416 { | 416 { |
417 MsnSlpMessage *slpmsg; | 417 MsnSlpMessage *slpmsg; |
418 | 418 |
419 /* Send the queued msgs in the order they were created */ | 419 /* Send the queued msgs in the order they were created */ |
420 while ((slpmsg = g_queue_pop_tail(slplink->slp_msg_queue)) != NULL) | 420 while ((slpmsg = g_queue_pop_head(slplink->slp_msg_queue)) != NULL) |
421 { | 421 { |
422 msn_slplink_release_slpmsg(slplink, slpmsg); | 422 msn_slplink_release_slpmsg(slplink, slpmsg); |
423 } | 423 } |
424 } | 424 } |
425 | 425 |