summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2007-07-04 14:20:39 +0000
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2007-07-04 14:20:39 +0000
commit5d2fbca0f8960df42defb9ee3842b5ea39dbff7c (patch)
tree4db9b124fa0822a61b1088da49c43bfb35b8d779
parent4a874ab5a10e836fee5f8e561c512b381fe39f9c (diff)
downloadtelepathy-salut-5d2fbca0f8960df42defb9ee3842b5ea39dbff7c.tar.gz
GibberRMulticastSender: Requested whois sender is now in data.whois_request.sender_id instead of sender
20070704142039-b58c9-84867314698c2ef7ce779d35f7a31dbd71a04a88.gz
-rw-r--r--lib/gibber/gibber-r-multicast-sender.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/gibber/gibber-r-multicast-sender.c b/lib/gibber/gibber-r-multicast-sender.c
index 86772155..5b13abed 100644
--- a/lib/gibber/gibber-r-multicast-sender.c
+++ b/lib/gibber/gibber-r-multicast-sender.c
@@ -730,10 +730,10 @@ gibber_r_multicast_sender_whois_push (GibberRMulticastSender *sender,
GibberRMulticastSenderPrivate *priv =
GIBBER_R_MULTICAST_SENDER_GET_PRIVATE (sender);
- g_assert(packet->sender == sender->id);
-
switch (packet->type) {
case PACKET_TYPE_WHOIS_REQUEST:
+ g_assert (packet->data.whois_request.sender_id == sender->id);
+
if (sender->name != NULL && priv->whois_timer == 0) {
gint timeout = g_random_int_range(MIN_WHOIS_TIMEOUT,
MAX_WHOIS_TIMEOUT);
@@ -742,6 +742,8 @@ gibber_r_multicast_sender_whois_push (GibberRMulticastSender *sender,
}
break;
case PACKET_TYPE_WHOIS_REPLY:
+ g_assert(packet->sender == sender->id);
+
if (sender->name == NULL) {
sender->name = g_strdup(packet->data.whois_reply.sender_name);
DEBUG_SENDER(sender, "Name discovered");