Logging error in sip_transport_tls.c

AW
Andreas Wehrmann
Wed, Feb 19, 2020 2:28 PM

Hey there,

I found a logging error in
https://github.com/pjsip/pjproject/blob/master/pjsip/src/pjsip/sip_transport_tls.c

In the function on_accept_complete2() there is the following log statement:

PJ_LOG(4,(listener->factory.obj_name,
       "TLS listener %s: got incoming TLS connection "
       "from %s, sock=%d",
       pj_addr_str_print(&listener->factory.addr_name.host,
                         listener->factory.addr_name.port, addr_buf,
                         sizeof(addr_buf), 1),
       pj_sockaddr_print(src_addr, addr, sizeof(addr), 3),
       new_ssock));

Which leads to output like this:
"TLS listener 10.137.8.11:5061: got incoming TLS connection from
10.137.8.19:38963, sock=-335377176"

I guess new_ssock once was the underlying socket but is an opaque
structure now, breaking this log statement.

All the best,
Andreas Wehrmann

Hey there, I found a logging error in https://github.com/pjsip/pjproject/blob/master/pjsip/src/pjsip/sip_transport_tls.c In the function on_accept_complete2() there is the following log statement: PJ_LOG(4,(listener->factory.obj_name,        "TLS listener %s: got incoming TLS connection "        "from %s, sock=%d",        pj_addr_str_print(&listener->factory.addr_name.host,                          listener->factory.addr_name.port, addr_buf,                          sizeof(addr_buf), 1),        pj_sockaddr_print(src_addr, addr, sizeof(addr), 3),        new_ssock)); Which leads to output like this: "TLS listener 10.137.8.11:5061: got incoming TLS connection from 10.137.8.19:38963, sock=-335377176" I guess new_ssock once was the underlying socket but is an opaque structure now, breaking this log statement. All the best, Andreas Wehrmann