Skip to content

Commit ce730a1

Browse files
committed
Fix "STUN binding failed" message never printed
(ret < 0 && ret == SENETUNREACH) is always false
1 parent f080952 commit ce730a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/agent.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1684,7 +1684,7 @@ int agent_send_stun_binding(juice_agent_t *agent, agent_stun_entry_t *entry, stu
16841684
// Direct send
16851685
int ret = agent_direct_send(agent, &entry->record, buffer, size, 0);
16861686
if (ret < 0) {
1687-
if (ret == SENETUNREACH)
1687+
if (ret == -SENETUNREACH)
16881688
JLOG_INFO("STUN binding failed: Network unreachable");
16891689
else
16901690
JLOG_WARN("STUN message send failed");

0 commit comments

Comments
 (0)