[Nice] problem when using libnice0.0.12 and a tiny bug

jiayu zeng grayblaze at gmail.com
Fri Jun 11 03:42:53 PDT 2010


Hi all,
      I use libnice0.0.12 in our project to do NAT traversing, however there
is a problem.
     when I get peer's candidates and then using
nice_agent_set_remote_candidates() to set candidates, however the connection
check always fail! here is the debug message:

(process:18123): libnice-DEBUG: Agent 0x91bb868: set_remote_candidates 1 1
(process:18123): libnice-DEBUG: Agent 0x91bb868 : Adding remote candidate
with addr [10.1.31.222]:56708 for s1/c1. U/P '(null)'/'(null)' prio:
152912400
(process:18123): libnice-DEBUG: Agent 0x91bb868 : creating new pair
0x91e5e28 state 5
(process:18123): libnice-DEBUG: Agent 0x91bb868 : Adding remote candidate
with addr [10.1.31.222]:56708
(process:18123): libnice-DEBUG: Agent 0x91bb868 : added a new conncheck
0x91e5e28 with foundation of '1:1' to list 1.
(process:18123): libnice-DEBUG: Agent 0x91bb868 : stream 1 component 1
STATE-CHANGE 1 -> 2.
(process:18123): libnice-DEBUG: Agent 0x91bb868 : Pair 0x91e5e28 with s/c-id
1/1 (1:1) unfrozen.
(process:18123): libnice-DEBUG: Agent 0x91bb868 : pair 0x91e5e28 state
WAITING remote candidate addr[10.1.31.222]:56708
(process:18123): libnice-DEBUG: Agent 0x91bb868 :
priv_conn_check_unfreeze_next returned 1
(process:18123): libnice-DEBUG: Agent 0x91bb868 : pair 0x91e5e28 state
IN_PROGRESS
(process:18123): libnice-DEBUG: Agent 0x91bb868 :  remote candidate with
addr [10.1.31.222]:56708
(process:18123): libnice-DEBUG: pair 0x91e5e28 Agent 0x91bb868 : STUN-CC REQ
to '10.1.31.222:34013', socket=8, pair=1:1 (c-id:1),
tie=16361108746083089059, username='l=\u001c    ' (0), password='' (0),
priority=1845494271.
(process:18123): libnice-DEBUG: Agent 0x91bb868 : STUN connectivity check
was cancelled, marking as done.
(process:18123): libnice-DEBUG: Agent 0x91bb868 : pair 0x91e5e28 state
FAILED
(process:18123): libnice-DEBUG: Agent 0x91bb868 : timer tick #1: 0 frozen, 0
in-progress, 0 waiting, 0 succeeded, 0 discovered, 0 nominated, 0
waiting-for-nom.
(process:18123): libnice-DEBUG: Agent 0x91bb868 :
priv_conn_check_tick_unlocked returned 1
(process:18123): libnice-DEBUG: Agent 0x91bb868 : conn_check_schedule_next
returning 1

(process:18123): libnice-DEBUG: Agent 0x91bb868 : timer tick #2: 0 frozen, 0
in-progress, 0 waiting, 0 succeeded, 0 discovered, 0 nominated, 0
waiting-for-nom.
(process:18123): libnice-DEBUG: Agent 0x91bb868 :
priv_conn_check_tick_unlocked: stopping conncheck timer
(process:18123): libnice-DEBUG: Agent 0x91bb868 : stream 1 component 1
STATE-CHANGE 2 -> 5.
(process:18123): libnice-DEBUG: Agent 0x91bb868 : conn.check list status: 0
nominated, 0 succeeded, c-id 1.
(process:18123): libnice-DEBUG: Agent 0x91bb868 : changing conncheck state
to COMPLETED.

I found that the peer's port is erro in the debug message, and then I find a
debug bug in conncheck.c line 1657,should we use ntohs here??but this is not
the essencial problem. I use netstat -aun in peer, and I find the udp port
56708 is opend,but why the connection check always fail?

I'm soory for my poor english, but hope you can understand what I say:)

thanks a lot!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/nice/attachments/20100611/977ef749/attachment.htm>


More information about the Nice mailing list