Commit 4cedf2b2 authored by Rohan Garg's avatar Rohan Garg Committed by Youness Alaoui

Use len instead of buf_len to check whether or not data was received properly

parent 9bc48e8e
......@@ -181,7 +181,7 @@ static int dgram_process (int sock, StunAgent *oldagent, StunAgent *newagent)
addr_len = sizeof (struct sockaddr_in);
len = recvfrom (sock, buf, sizeof(buf), 0,
(struct sockaddr *)&addr, &addr_len);
if (buf_len == (size_t)-1)
if (len == (size_t)-1)
return -1;
validation = stun_agent_validate (newagent, &request, buf, len, NULL, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment