PJ_DEF(void) pjsua_turn_config_dup(pj_pool_t *pool,
                                   pjsua_turn_config *dst,
                                   const pjsua_turn_config *src)
{
    pj_memcpy(dst, src, sizeof(*src));
    if (pool) {
	pj_strdup(pool, &dst->turn_server, &src->turn_server);
	pj_stun_auth_cred_dup(pool, &dst->turn_auth_cred,
	                      &src->turn_auth_cred);

#if PJ_HAS_SSL_SOCK
	pj_turn_sock_tls_cfg_dup(pool, &dst->turn_tls_setting,
				 &src->turn_tls_setting);
#endif
    }
}
PJ_DEF(void) pjsua_turn_config_dup(pj_pool_t *pool,
                                   pjsua_turn_config *dst,
                                   const pjsua_turn_config *src)
{
    pj_memcpy(dst, src, sizeof(*src));
    if (pool) {
	pj_strdup(pool, &dst->turn_server, &src->turn_server);
	pj_stun_auth_cred_dup(pool, &dst->turn_auth_cred,
	                      &src->turn_auth_cred);

#if PJ_HAS_SSL_SOCK
	pj_turn_sock_tls_cfg_dup(pool, &dst->turn_tls_setting,
				 &src->turn_tls_setting);
#endif
    }
}