Commit 12043d2e authored by Pekka Pessi's avatar Pekka Pessi

nta, tport: fixed int/unsigned/size_t types. Patch by Mike Jerris.

darcs-hash:20070206213418-65a35-22b4149175415558e950184ae72475bb487d3ad3.gz
parent fa767916
......@@ -369,8 +369,10 @@ nta_agent_t *nta_agent_create(su_root_t *root,
agent->sa_flags = MSG_DO_CANONIC;
agent->sa_maxsize = 2 * 1024 * 1024; /* 2 MB */
agent->sa_bad_req_mask = ~(sip_mask_response | sip_mask_proxy);
agent->sa_bad_resp_mask = ~(sip_mask_request | sip_mask_proxy);
agent->sa_bad_req_mask =
(unsigned) ~(sip_mask_response | sip_mask_proxy);
agent->sa_bad_resp_mask =
(unsigned) ~(sip_mask_request | sip_mask_proxy);
agent->sa_t1 = NTA_SIP_T1;
agent->sa_t2 = NTA_SIP_T2;
agent->sa_t4 = NTA_SIP_T4;
......@@ -4219,7 +4221,7 @@ static inline void incoming_queue(incoming_queue_t *queue, nta_incoming_t *);
static inline void incoming_remove(nta_incoming_t *irq);
static inline void incoming_set_timer(nta_incoming_t *, unsigned interval);
static inline void incoming_reset_timer(nta_incoming_t *);
static inline int incoming_mass_destroy(nta_agent_t *sa, incoming_queue_t *q);
static inline size_t incoming_mass_destroy(nta_agent_t *, incoming_queue_t *);
static int incoming_set_params(nta_incoming_t *irq, tagi_t const *tags);
static inline
......@@ -6066,7 +6068,7 @@ su_duration_t incoming_timer(nta_agent_t *sa, su_duration_t next)
/** Mass destroy server transactions */
static inline
int incoming_mass_destroy(nta_agent_t *sa, incoming_queue_t *q)
size_t incoming_mass_destroy(nta_agent_t *sa, incoming_queue_t *q)
{
size_t destroyed = q->q_length;
......@@ -10294,7 +10296,7 @@ int nta_tport_keepalive(nta_outgoing_t *orq)
/** Close all transports. @since Experimental in @VERSION_1_12_2. */
int nta_agent_close_tports(nta_agent_t *agent)
{
int i;
size_t i;
outgoing_htable_t *oht = agent->sa_outgoing;
incoming_htable_t *iht = agent->sa_incoming;
......@@ -10308,7 +10310,7 @@ int nta_agent_close_tports(nta_agent_t *agent)
orq->orq_pending = 0;
tport_unref(orq->orq_tport), orq->orq_tport = NULL;
}
}
for (i = iht->iht_size; i-- > 0;)
......
......@@ -3152,7 +3152,7 @@ int tport_prepare_and_send(tport_t *self, msg_t *msg,
return -1;
}
if (msg_size(msg) > (mtu ? mtu : tport_mtu(self))) {
if (msg_size(msg) > (usize_t)(mtu ? mtu : tport_mtu(self))) {
msg_set_errno(msg, EMSGSIZE);
return -1;
}
......
......@@ -91,7 +91,7 @@ typedef long unsigned LU; /* for printf() and friends */
/** Transport parameters */
typedef struct {
usize_t tpp_mtu; /**< Maximum packet size */
unsigned tpp_mtu; /**< Maximum packet size */
unsigned tpp_idle; /**< Allowed connection idle time. */
unsigned tpp_timeout; /**< Allowed idle time for message. */
unsigned tpp_sigcomp_lifetime; /**< SigComp compartment lifetime */
......
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