summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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");