diff options
author | Rohan Garg <rohangarg@kubuntu.org> | 2012-03-23 13:32:23 +0530 |
---|---|---|
committer | Youness Alaoui <youness.alaoui@collabora.co.uk> | 2012-03-23 15:21:39 -0400 |
commit | 4cedf2b24d3276234e5c821199c8cb4638225d3e (patch) | |
tree | 964096987a25e34e1431a6e9136f96aa9be4db7b | |
parent | 9bc48e8e7940446d12e1711a98b8765e1108f198 (diff) |
Use len instead of buf_len to check whether or not data was received properly
-rw-r--r-- | stun/tools/stund.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/stun/tools/stund.c b/stun/tools/stund.c index 61d1e37..d340d19 100644 --- a/stun/tools/stund.c +++ b/stun/tools/stund.c @@ -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); |