static void update_bound_addr(struct tls_listener *listener,
			      const pj_sockaddr *local)
{
    pj_sockaddr *listener_addr = &listener->factory.local_addr;
    int af = pjsip_transport_type_get_af(listener->factory.type);

    /* Bind address may be different than factory.local_addr because
     * factory.local_addr will be resolved.
     */
    if (local) {
	pj_sockaddr_cp(&listener->bound_addr, local);
    } else {
	pj_sockaddr_init(af, &listener->bound_addr, NULL, 0);
    }
    pj_sockaddr_cp(listener_addr, &listener->bound_addr);    
}
static void update_bound_addr(struct tls_listener *listener,
			      const pj_sockaddr *local)
{
    pj_sockaddr *listener_addr = &listener->factory.local_addr;
    int af = pjsip_transport_type_get_af(listener->factory.type);

     
    if (local) {
	pj_sockaddr_cp(&listener->bound_addr, local);
    } else {
	pj_sockaddr_init(af, &listener->bound_addr, NULL, 0);
    }
    pj_sockaddr_cp(listener_addr, &listener->bound_addr);    
}