Commit f514a265 authored by jehan's avatar jehan

enable error traces when port binding failed

parent 51498fe2
......@@ -233,7 +233,7 @@ static void __ortp_logv_out(OrtpLogLevel lev, const char *fmt, va_list args){
}
#endif
#endif
fprintf(__log_file,"%i-%i-%i %i:%i:%i:%.3i ortp-%s-%s" ENDLINE,1900+lt->tm_year,lt->tm_mon,lt->tm_mday,lt->tm_hour,lt->tm_min,lt->tm_sec,tp.tv_usec/1000, lname,msg);
fprintf(__log_file,"%i-%.2i-%.2i %.2i:%.2i:%.2i:%.3i ortp-%s-%s" ENDLINE,1900+lt->tm_year,lt->tm_mon,lt->tm_mday,lt->tm_hour,lt->tm_min,lt->tm_sec,(int)(tp.tv_usec/1000), lname,msg);
fflush(__log_file);
ortp_free(msg);
}
......
......@@ -153,7 +153,7 @@ static ortp_socket_t create_and_bind(const char *addr, int *port, int *sock_fami
*sock_family=res->ai_family;
err = bind (sock, res->ai_addr, res->ai_addrlen);
if (err != 0){
ortp_debug ("Fail to bind rtp socket to (addr=%s port=%i) : %s.", addr, *port, getSocketError());
ortp_error ("Fail to bind rtp socket to (addr=%s port=%i) : %s.", addr, *port, getSocketError());
close_socket (sock);
sock=-1;
continue;
......@@ -307,7 +307,7 @@ rtp_session_set_local_addr (RtpSession * session, const char * addr, int rtp_por
session->rtcp.gs.socket=sock;
session->rtcp.gs.loc_port=rtcp_port;
}else {
ortp_debug("Could not create and bind rtcp socket.");
ortp_error("Could not create and bind rtcp socket for session [%p]",session);
return -1;
}
......@@ -317,7 +317,7 @@ rtp_session_set_local_addr (RtpSession * session, const char * addr, int rtp_por
rtp_session_set_multicast_loopback( session, -1 );
return 0;
}
ortp_debug("Could not bind RTP socket on port to %s port %i",addr,rtp_port);
ortp_error("Could not bind RTP socket to %s on port %i for session [%p]",addr,rtp_port,session);
return -1;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment