program halt when call nice_agent_send
Hi
i have two peer programs using libnice api to communiate with each other via tcp relay by Google opensource coturn server, it works normal at first 5 minutes, then one peer program (controlling-mode = 1) just halt when call nice_agent_send.
i try to find the program execute line when program is halt,
one line is marked by ------>
libnice\agent\agent.c
static gint nice_agent_send_messages_nonblocking_internal(NiceAgent *agent,guint stream_id,guint component_id,const NiceOutputMessage *messages,guint n_messages,gboolean allow_partial,GError **error){
NiceStream *stream;
NiceComponent *component;
gint n_sent = -1; /* is in bytes if allow_partial is TRUE, otherwise in messages */
GError *child_error = NULL;
g_assert(n_messages == 1 || !allow_partial);
------> agent_lock(agent);
if (!agent_find_component(agent, stream_id, component_id,
&stream, &component)) {
g_set_error(&child_error, G_IO_ERROR, G_IO_ERROR_BROKEN_PIPE,
"Invalid stream/component.");
goto done;
}
...............................................................................
another line is also marked by ------>
libnice\socket\udp-turn.c
void nice_udp_turn_socket_cache_realm_nonce(NiceSocket *sock, StunMessage *msg){
UdpTurnPriv *priv = sock->priv;
gconstpointer tmp;
g_assert(sock->type == NICE_SOCKET_TYPE_UDP_TURN);
------> g_mutex_lock(&mutex);
g_free(priv->cached_realm);
priv->cached_realm = NULL;
priv->cached_realm_len = 0;
...............................................................................
any idea or suggestion will be welcome, thanks.