stun/turn: add #ifdef USE_DTLS
This commit is contained in:
parent
2178de4d3a
commit
6fee0d5896
3 changed files with 6 additions and 0 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue