Commit 62e56811 authored by Pekka Pessi's avatar Pekka Pessi

Fixed TPTAG_CONNECT() usage in tport/tport.c.

darcs-hash:20060426182227-65a35-f4be46f8357a641d3c46162df3beebd18a876607.gz
parent cb94393b
...@@ -1052,6 +1052,7 @@ int tport_get_params(tport_t const *self, ...@@ -1052,6 +1052,7 @@ int tport_get_params(tport_t const *self,
int n; int n;
tport_params_t const *tpp; tport_params_t const *tpp;
tport_primary_t const *pri = self->tp_pri; tport_primary_t const *pri = self->tp_pri;
int connect;
if (self == NULL) if (self == NULL)
return su_seterrno(EINVAL); return su_seterrno(EINVAL);
...@@ -1059,10 +1060,14 @@ int tport_get_params(tport_t const *self, ...@@ -1059,10 +1060,14 @@ int tport_get_params(tport_t const *self,
tpp = self->tp_params; tpp = self->tp_params;
ta_start(ta, tag, value); ta_start(ta, tag, value);
connect = tpp->tpp_conn_orient
/* Only dgram primary is *not* connection-oriented */
|| !tport_is_primary(self) || !tport_is_dgram(self);
n = tl_tgets(ta_args(ta), n = tl_tgets(ta_args(ta),
TPTAG_MTU(tpp->tpp_mtu), TPTAG_MTU(tpp->tpp_mtu),
TPTAG_REUSE(self->tp_reusable), TPTAG_REUSE(self->tp_reusable),
TPTAG_CONNECT(tpp->tpp_conn_orient), TPTAG_CONNECT(connect),
TPTAG_QUEUESIZE(tpp->tpp_qsize), TPTAG_QUEUESIZE(tpp->tpp_qsize),
TPTAG_IDLE(tpp->tpp_idle), TPTAG_IDLE(tpp->tpp_idle),
TPTAG_TIMEOUT(tpp->tpp_timeout), TPTAG_TIMEOUT(tpp->tpp_timeout),
...@@ -1141,8 +1146,7 @@ int tport_set_params(tport_t *self, ...@@ -1141,8 +1146,7 @@ int tport_set_params(tport_t *self,
tpp->tpp_qsize = 1000; tpp->tpp_qsize = 1000;
/* Currently only primary UDP transport can *not* be connection oriented */ /* Currently only primary UDP transport can *not* be connection oriented */
tpp->tpp_conn_orient = connect tpp->tpp_conn_orient = connect;
|| !tport_is_primary(self) || !tport_is_dgram(self);
tpp->tpp_sdwn_error = sdwn_error; tpp->tpp_sdwn_error = sdwn_error;
self->tp_reusable = reusable; self->tp_reusable = reusable;
tpp->tpp_stun_server = stun_server; tpp->tpp_stun_server = stun_server;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment