Hi Youness,<br>Thanks for your reply! yes, I check my code again
according your suggestion,and I find a mistake, I set the wrong password
when I use nice_agent_set_remote_<div id=":4f" class="ii gt">credentials function. After I
correctting this mistake, <span class="il">libnice</span> works very
well!<br>
<br>thans for your help!</div><br><br><div class="gmail_quote">2010/6/12 Youness Alaoui <span dir="ltr"><<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi,<br>
<br>
First, I notice the Username/password are both NULL in your candidates.. maybe<br>
you didn't set them correctly ? or if you're using the RFC compatibility mode,<br>
did you call the nice_agent_set_remote_credentials function ?<br>
You're not giving me enough information to understand your issue.. I don't know<br>
the compatibility mode you used, I don't have the logs from both sides either,<br>
make sure both sides are setting their candidates properly.<br>
Also, it fails to establish the connection because it doesn't receive any data..<br>
did you call the nice_agent_attach_recv function properly ?<br>
I also noticed that the only candidate you have is 10.1.31.222 which seems to be<br>
a local candidate, if the call is not being made inside the same local netword,<br>
then it won't work, you might need to set the STUN server on your agent for it<br>
to do proper NAT traversal.<br>
<br>
Youness.<br>
<div><div></div><div class="h5"><br>
jiayu zeng wrote:<br>
> Hi all,<br>
> I use libnice0.0.12 in our project to do NAT traversing, however<br>
> there is a problem.<br>
> when I get peer's candidates and then using<br>
> nice_agent_set_remote_candidates() to set candidates, however the<br>
> connection check always fail! here is the debug message:<br>
><br>
> (process:18123): libnice-DEBUG: Agent 0x91bb868: set_remote_candidates 1 1<br>
> (process:18123): libnice-DEBUG: Agent 0x91bb868 : Adding remote<br>
> candidate with addr [10.1.31.222]:56708 for s1/c1. U/P '(null)'/'(null)'<br>
> prio: 152912400<br>
> (process:18123): libnice-DEBUG: Agent 0x91bb868 : creating new pair<br>
> 0x91e5e28 state 5<br>
> (process:18123): libnice-DEBUG: Agent 0x91bb868 : Adding remote<br>
> candidate with addr [10.1.31.222]:56708<br>
> (process:18123): libnice-DEBUG: Agent 0x91bb868 : added a new conncheck<br>
> 0x91e5e28 with foundation of '1:1' to list 1.<br>
> (process:18123): libnice-DEBUG: Agent 0x91bb868 : stream 1 component 1<br>
> STATE-CHANGE 1 -> 2.<br>
> (process:18123): libnice-DEBUG: Agent 0x91bb868 : Pair 0x91e5e28 with<br>
> s/c-id 1/1 (1:1) unfrozen.<br>
> (process:18123): libnice-DEBUG: Agent 0x91bb868 : pair 0x91e5e28 state<br>
> WAITING remote candidate addr[10.1.31.222]:56708<br>
> (process:18123): libnice-DEBUG: Agent 0x91bb868 :<br>
> priv_conn_check_unfreeze_next returned 1<br>
> (process:18123): libnice-DEBUG: Agent 0x91bb868 : pair 0x91e5e28 state<br>
> IN_PROGRESS<br>
> (process:18123): libnice-DEBUG: Agent 0x91bb868 : remote candidate with<br>
> addr [10.1.31.222]:56708<br>
> (process:18123): libnice-DEBUG: pair 0x91e5e28 Agent 0x91bb868 : STUN-CC<br>
</div></div>> REQ to '10.1.31.222 <<a href="http://10.1.31.222" target="_blank">http://10.1.31.222</a>>:34013', socket=8, pair=1:1<br>
<div><div></div><div class="h5">> (c-id:1), tie=16361108746083089059, username='l=\u001c ' (0),<br>
> password='' (0), priority=1845494271.<br>
> (process:18123): libnice-DEBUG: Agent 0x91bb868 : STUN connectivity<br>
> check was cancelled, marking as done.<br>
> (process:18123): libnice-DEBUG: Agent 0x91bb868 : pair 0x91e5e28 state<br>
> FAILED<br>
> (process:18123): libnice-DEBUG: Agent 0x91bb868 : timer tick #1: 0<br>
> frozen, 0 in-progress, 0 waiting, 0 succeeded, 0 discovered, 0<br>
> nominated, 0 waiting-for-nom.<br>
> (process:18123): libnice-DEBUG: Agent 0x91bb868 :<br>
> priv_conn_check_tick_unlocked returned 1<br>
> (process:18123): libnice-DEBUG: Agent 0x91bb868 :<br>
> conn_check_schedule_next returning 1<br>
><br>
> (process:18123): libnice-DEBUG: Agent 0x91bb868 : timer tick #2: 0<br>
> frozen, 0 in-progress, 0 waiting, 0 succeeded, 0 discovered, 0<br>
> nominated, 0 waiting-for-nom.<br>
> (process:18123): libnice-DEBUG: Agent 0x91bb868 :<br>
> priv_conn_check_tick_unlocked: stopping conncheck timer<br>
> (process:18123): libnice-DEBUG: Agent 0x91bb868 : stream 1 component 1<br>
> STATE-CHANGE 2 -> 5.<br>
> (process:18123): libnice-DEBUG: Agent 0x91bb868 : conn.check list<br>
> status: 0 nominated, 0 succeeded, c-id 1.<br>
> (process:18123): libnice-DEBUG: Agent 0x91bb868 : changing conncheck<br>
> state to COMPLETED.<br>
><br>
> I found that the peer's port is erro in the debug message, and then I<br>
> find a debug bug in conncheck.c line 1657,should we use ntohs here??but<br>
> this is not the essencial problem. I use netstat -aun in peer, and I<br>
> find the udp port 56708 is opend,but why the connection check always fail?<br>
><br>
> I'm soory for my poor english, but hope you can understand what I say:)<br>
><br>
> thanks a lot!<br>
><br>
><br>
><br>
><br>
</div></div>> ------------------------------------------------------------------------<br>
><br>
> _______________________________________________<br>
> Nice mailing list<br>
> <a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/nice" target="_blank">http://lists.freedesktop.org/mailman/listinfo/nice</a><br>
<br>
<br>
</blockquote></div><br>