stun/turn: add #ifdef USE_DTLS

This commit is contained in:
Richard Aas 2014-12-10 08:22:17 +00:00
parent 2178de4d3a
commit 6fee0d5896
3 changed files with 6 additions and 0 deletions

View file

@ -295,6 +295,7 @@ int stun_ctrans_request(struct stun_ctrans **ctp, struct stun *stun, int proto,
tcp_close_handler, ct);
break;
#ifdef USE_DTLS
case STUN_TRANSP_DTLS:
if (!sock) {
err = EINVAL;
@ -307,6 +308,7 @@ int stun_ctrans_request(struct stun_ctrans **ctp, struct stun *stun, int proto,
ct->txc = 1;
err = dtls_send(ct->sock, mb);
break;
#endif
default:
err = EPROTONOSUPPORT;

View file

@ -110,9 +110,11 @@ int stun_send(int proto, void *sock, const struct sa *dst, struct mbuf *mb)
err = tcp_send(sock, mb);
break;
#ifdef USE_DTLS
case STUN_TRANSP_DTLS:
err = dtls_send(sock, mb);
break;
#endif
default:
err = EPROTONOSUPPORT;

View file

@ -538,9 +538,11 @@ int turnc_send(struct turnc *turnc, const struct sa *dst, struct mbuf *mb)
err = tcp_send(turnc->sock, mb);
break;
#ifdef USE_DTLS
case STUN_TRANSP_DTLS:
err = dtls_send(turnc->sock, mb);
break;
#endif
default:
err = EPROTONOSUPPORT;