Commit 87fd1a86 authored by Kai Samposalo's avatar Kai Samposalo

Symbian winscw build fix

Ignore-this: 9ba9bcd0507b4925c49328e6318404b9

darcs-hash:20090629125227-9e0af-412192f59d8eefc741931877dd8d0574c27fc5b1.gz
parent 1807508b
......@@ -332,7 +332,8 @@ int http_version_d(char **ss, char const **ver)
for (n = l1; IS_LWS(s[n]); n++)
s[n] = '\0';
if (s[n] == '/') {
for (n = n + 1; IS_LWS(s[n]); n++);
for (n = n + 1; IS_LWS(s[n]); n++)
{}
l2 = span_token(s + n);
n += l2;
}
......@@ -492,7 +493,7 @@ http_method_t http_method_d(char **ss, char const **nname)
*ss = (s + n);
if (nname) *nname = name;
return code;
return (http_method_t)code;
}
/** Get method enum corresponding to method name */
......
......@@ -984,9 +984,11 @@ issize_t msg_mediatype_d(char **ss, char const **type)
/* Media type consists of two tokens, separated by / */
l1 = span_token(s);
for (n = l1; IS_LWS(s[n]); n++);
for (n = l1; IS_LWS(s[n]); n++)
{}
if (s[n] == '/') {
for (n++; IS_LWS(s[n]); n++);
for (n++; IS_LWS(s[n]); n++)
{}
l2 = span_token(s + n);
n += l2;
}
......
......@@ -872,7 +872,7 @@ int msg_extract(msg_t *msg)
}
if (mo->msg_flags & MSG_FLG_TRAILERS)
msg_set_streaming(msg, 0);
msg_set_streaming(msg, (enum msg_streaming_status)0);
if (msg->m_buffer->mb_used + msg->m_buffer->mb_commit ==
msg->m_buffer->mb_size)
......
......@@ -415,7 +415,7 @@ issize_t msg_avlist_d(su_home_t *home,
if (n == N) {
/* Reallocate params */
char const **nparams = su_realloc(home, params != stack ? params : NULL,
char const **nparams = su_realloc(home, (void*)(params != stack ? params : NULL),
(N = MSG_PARAMS_NUM(N + 1)) * sizeof(*params));
if (!nparams) {
goto error;
......@@ -443,7 +443,7 @@ issize_t msg_avlist_d(su_home_t *home,
}
else if (n == N) {
/* Reallocate params */
char const **nparams = su_realloc(home, params != stack ? params : NULL,
char const **nparams = su_realloc(home, (void*)(params != stack ? params : NULL),
(N = MSG_PARAMS_NUM(N + 1)) * sizeof(*params));
if (!nparams) {
goto error;
......@@ -1553,7 +1553,8 @@ int msg_header_join_items(su_home_t *home,
if (s == NULL)
return 0;
for (M = 0; s[M]; M++);
for (M = 0; s[M]; M++)
{}
if (M == 0)
return 0;
......@@ -1570,7 +1571,8 @@ int msg_header_join_items(su_home_t *home,
dd = (msg_param_t **)((char *)dst + dst->h_class->hc_params);
d = *dd;
for (N = 0; d && d[N]; N++);
for (N = 0; d && d[N]; N++)
{}
for (m = 0, M = 0, total = 0; s[m]; m++) {
t = s[m];
......
......@@ -3155,7 +3155,7 @@ int agent_aliases(nta_agent_t const *agent, url_t url[], tport_t *tport)
url->url_port = lv->v_port;
return 1;
}
if (su_strmatch(url->url_port, url_port_default(url->url_type)) ||
if (su_strmatch(url->url_port, url_port_default((enum url_type_e)url->url_type)) ||
su_strmatch(url->url_port, ""))
/* Remove default or empty port */
url->url_port = NULL;
......@@ -11745,7 +11745,7 @@ int nta_tport_keepalive(nta_outgoing_t *orq)
{
tport_t *tp;
assert(orq); (void)tp;
assert(orq);
#if HAVE_SOFIA_STUN
return tport_keepalive(orq->orq_tport, msg_addrinfo(orq->orq_request),
......
......@@ -608,13 +608,13 @@ int tpn_by_host(tp_name_t * tpn, http_host_t const *h, url_t const *url)
if (!h || !url)
return -1;
tpn->tpn_proto = url_tport_default(url->url_type);
tpn->tpn_proto = url_tport_default((enum url_type_e)url->url_type);
tpn->tpn_canon = h->h_host;
tpn->tpn_host = h->h_host;
if (h->h_port)
tpn->tpn_port = h->h_port;
else
tpn->tpn_port = url_port_default(url->url_type);
tpn->tpn_port = url_port_default((enum url_type_e)url->url_type);
return 0;
}
......@@ -1189,7 +1189,7 @@ int hc_recv(nth_client_t * hc, msg_t *msg, http_t * http)
if (streaming && !hc->hc_streaming) {
/* Disable streaming for this msg */
msg_set_streaming(msg, 0);
msg_set_streaming(msg, (enum msg_streaming_status)0);
return 0; /* Wait for complete message */
}
......@@ -1204,7 +1204,7 @@ int hc_recv(nth_client_t * hc, msg_t *msg, http_t * http)
shutdown = 2;
if (!streaming || shutdown)
msg_set_streaming(msg, 0);
msg_set_streaming(msg, (enum msg_streaming_status)0);
if (hc->hc_pending) {
tport_release(hc->hc_tport, hc->hc_pending, hc->hc_request, msg, hc,
......
......@@ -283,7 +283,7 @@ nth_site_t *nth_site_create(nth_site_t *parent,
if (parent->site_path) {
/* subpath */
url_init(url0, parent->site_url->url_type);
url_init(url0, (enum url_type_e)parent->site_url->url_type);
url0->url_path = s;
address = (url_string_t*)url0;
}
......@@ -291,13 +291,13 @@ nth_site_t *nth_site_create(nth_site_t *parent,
/* absolute URL with scheme */;
else if (s[sep] == '\0' && strchr(s, '.') && host_is_valid(s)) {
/* looks like a domain name */;
url_init(url0, parent->site_url->url_type);
url_init(url0, (enum url_type_e)parent->site_url->url_type);
url0->url_host = s;
address = (url_string_t*)url0;
}
else {
/* looks like a path */
url_init(url0, parent->site_url->url_type);
url_init(url0, (enum url_type_e)parent->site_url->url_type);
url0->url_path = s;
address = (url_string_t*)url0;
}
......@@ -726,7 +726,7 @@ server_t *server_create(url_t const *url,
return NULL;
}
tpn->tpn_proto = url_tport_default(url->url_type);
tpn->tpn_proto = url_tport_default((enum url_type_e)url->url_type);
tpn->tpn_canon = url->url_host;
tpn->tpn_host = url->url_host;
tpn->tpn_port = url_port(url);
......@@ -829,7 +829,7 @@ void server_request(server_t *srv,
/* Disable streaming */
if (msg_is_streaming(request)) {
msg_set_streaming(request, 0);
msg_set_streaming(request, (enum msg_streaming_status)0);
return;
}
......@@ -901,7 +901,7 @@ void server_request(server_t *srv,
else {
tp_name_t const *tpn = tport_name(tport); assert(tpn);
loc->loc_url->url_host = tpn->tpn_canon;
if (strcmp(url_port_default(loc->loc_url->url_type), tpn->tpn_port))
if (strcmp(url_port_default((enum url_type_e)loc->loc_url->url_type), tpn->tpn_port))
loc->loc_url->url_port = tpn->tpn_port;
}
}
......
......@@ -153,7 +153,7 @@ int nua_client_create(nua_handle_t *nh,
if (!cr) {
return nua_stack_event(nh->nh_nua, nh,
NULL,
event,
(enum nua_event_e)event,
NUA_ERROR_AT(__FILE__, __LINE__),
NULL);
}
......@@ -1244,7 +1244,7 @@ su_inline
int can_redirect(sip_contact_t const *m, sip_method_t method)
{
if (m && m->m_url->url_host) {
enum url_type_e type = m->m_url->url_type;
enum url_type_e type = (enum url_type_e)m->m_url->url_type;
return
type == url_sip ||
type == url_sips ||
......@@ -1545,7 +1545,7 @@ int nua_client_report(nua_client_request_t *cr,
nua_stack_event(nh->nh_nua, nh,
nta_outgoing_getresponse(orq),
cr->cr_event,
(enum nua_event_e)cr->cr_event,
status, phrase,
tags);
return 1;
......
......@@ -228,7 +228,7 @@ void authorize_watcher(nea_server_t *nes,
}
SU_DEBUG_7(("nua(%p): authorize_watcher: %s\n", (void *)nh, what));
nea_sub_auth(sn->sn_subscriber, substate,
nea_sub_auth(sn->sn_subscriber, (nea_state_t)substate,
TAG_IF(substate == nua_substate_pending,
NEATAG_FAKE(1)),
TAG_IF(substate == nua_substate_terminated,
......@@ -265,7 +265,7 @@ void nua_stack_authorize(nua_t *nua,
TAG_END());
if (sub && state > 0) {
nea_sub_auth(sub, state, TAG_NEXT(tags));
nea_sub_auth(sub, (nea_state_t)state, TAG_NEXT(tags));
nua_stack_event(nua, nh, NULL, e, SIP_200_OK, NULL);
}
else {
......
......@@ -764,7 +764,7 @@ static int nua_notify_client_report(nua_client_request_t *cr,
nua_stack_tevent(nh->nh_nua, nh,
nta_outgoing_getresponse(orq),
cr->cr_event,
(enum nua_event_e)cr->cr_event,
status, phrase,
NUTAG_SUBSTATE(substate),
SIPTAG_EVENT(du ? du->du_event : NULL),
......
......@@ -762,7 +762,7 @@ static int nhp_set_tags(su_home_t *home,
else if (refresher <= nua_no_refresher)
refresher = nua_no_refresher;
NHP_SET(nhp, refresher, refresher);
NHP_SET(nhp, refresher, (enum nua_session_refresher)refresher);
}
/* NUTAG_UPDATE_REFRESH(update_refresh) */
else if (tag == nutag_update_refresh) {
......
......@@ -684,7 +684,7 @@ int nua_base_server_report(nua_server_request_t *sr, tagi_t const *tags)
}
else if (status < 300 && !sr->sr_event) {
msg_t *msg = msg_ref_create(sr->sr_request.msg);
nua_event_t e = sr->sr_methods->sm_event;
nua_event_t e = (enum nua_event_e)sr->sr_methods->sm_event;
sr->sr_event = 1;
nua_stack_event(nua, nh, msg, e, status, phrase, tags);
}
......
......@@ -275,7 +275,7 @@ void nua_session_usage_remove(nua_handle_t *nh,
if (cr->cr_status < 200) {
nua_stack_event(nh->nh_nua, nh,
NULL,
cr->cr_event,
(enum nua_event_e)cr->cr_event,
SIP_481_NO_TRANSACTION,
NULL);
}
......@@ -1028,7 +1028,7 @@ static int nua_invite_client_report(nua_client_request_t *cr,
nua_stack_event(nh->nh_nua, nh,
response,
cr->cr_event,
(enum nua_event_e)cr->cr_event,
status, phrase,
tags);
......@@ -1145,7 +1145,7 @@ static int nua_invite_client_report(nua_client_request_t *cr,
ss->ss_reporting = 0;
signal_call_state_change(nh, ss, status, phrase, next_state);
signal_call_state_change(nh, ss, status, phrase, (enum nua_callstate)next_state);
msg_destroy(response);
......@@ -1846,7 +1846,7 @@ static int nua_prack_client_report(nua_client_request_t *cr,
nua_stack_event(nh->nh_nua, nh,
nta_outgoing_getresponse(orq),
cr->cr_event,
(enum nua_event_e)cr->cr_event,
status, phrase,
tags);
......@@ -1877,7 +1877,7 @@ static int nua_prack_client_report(nua_client_request_t *cr,
}
}
signal_call_state_change(nh, ss, status, phrase, next_state);
signal_call_state_change(nh, ss, status, phrase, (enum nua_callstate)next_state);
}
if (acked &&
......@@ -3387,7 +3387,7 @@ static int nua_update_client_report(nua_client_request_t *cr,
nua_stack_event(nh->nh_nua, nh,
nta_outgoing_getresponse(orq),
cr->cr_event,
(enum nua_event_e)cr->cr_event,
status, phrase,
tags);
......@@ -3415,7 +3415,7 @@ static int nua_update_client_report(nua_client_request_t *cr,
}
}
signal_call_state_change(nh, ss, status, phrase, next_state);
signal_call_state_change(nh, ss, status, phrase, (enum nua_callstate)next_state);
}
return 1;
......@@ -3798,7 +3798,7 @@ static int nua_bye_client_report(nua_client_request_t *cr,
nua_stack_event(nh->nh_nua, nh,
nta_outgoing_getresponse(orq),
cr->cr_event,
(enum nua_event_e)cr->cr_event,
status, phrase,
tags);
......
......@@ -373,7 +373,7 @@ void nua_application_event(nua_t *dummy, su_msg_r sumsg, nua_ee_data_t *ee)
}
else if (!nh->nh_valid) { /* Handle has been destroyed */
if (nua_log->log_level >= 7) {
char const *name = nua_event_name(e->e_event) + 4;
char const *name = nua_event_name((enum nua_event_e)e->e_event) + 4;
SU_DEBUG_7(("nua(%p): event %s dropped\n", (void *)nh, name));
}
nua_handle_unref(nh);
......@@ -390,7 +390,7 @@ void nua_application_event(nua_t *dummy, su_msg_r sumsg, nua_ee_data_t *ee)
su_msg_save(frame->nf_saved, sumsg);
frame->nf_next = nua->nua_current, nua->nua_current = frame;
nua->nua_callback(e->e_event, e->e_status, e->e_phrase,
nua->nua_callback((enum nua_event_e)e->e_event, e->e_status, e->e_phrase,
nua, nua->nua_magic,
nh, nh ? nh->nh_magic : NULL,
e->e_msg ? sip_object(e->e_msg) : NULL,
......@@ -544,7 +544,7 @@ void nua_stack_signal(nua_t *nua, su_msg_r msg, nua_ee_data_t *ee)
}
if (nua_log->log_level >= 5) {
char const *name = nua_event_name(e->e_event);
char const *name = nua_event_name((enum nua_event_e)e->e_event);
if (e->e_status == 0)
SU_DEBUG_5(("nua(%p): %s signal %s\n", (void *)nh, "recv", name + 4));
......@@ -556,7 +556,7 @@ void nua_stack_signal(nua_t *nua, su_msg_r msg, nua_ee_data_t *ee)
su_msg_save(nua->nua_signal, msg);
event = e->e_event;
event = (enum nua_event_e)e->e_event;
if (nua->nua_shutdown && !e->e_always) {
/* Shutting down */
......@@ -913,7 +913,7 @@ nua_handle_t *nh_validate(nua_t *nua, nua_handle_t *maybe)
void nua_stack_destroy_handle(nua_t *nua, nua_handle_t *nh, tagi_t const *tags)
{
if (nh->nh_notifier)
nua_stack_terminate(nua, nh, 0, NULL);
nua_stack_terminate(nua, nh, (enum nua_event_e)0, NULL);
nua_dialog_shutdown(nh, nh->nh_ds);
......
......@@ -888,7 +888,7 @@ static int nua_refer_client_request(nua_client_request_t *cr,
if (!error) {
/* Give application an Event header for matching NOTIFYs with REFER */
nua_stack_tevent(nh->nh_nua, nh, NULL,
cr->cr_event, SIP_100_TRYING,
(enum nua_event_e)cr->cr_event, SIP_100_TRYING,
NUTAG_REFER_EVENT(event),
SIPTAG_EVENT(event),
TAG_END());
......
......@@ -1272,7 +1272,7 @@ feature_level(sip_t const *sip, char const *tag, int level)
else if (sip_has_feature(sip->sip_unsupported, tag))
return outbound_feature_unsupported;
else
return level;
return (enum outbound_feature)level;
}
......
......@@ -1287,7 +1287,7 @@ sip_cseq_t *sip_cseq_create(su_home_t *home,
sip_cseq_t *cs;
if (method)
method_name = sip_method_name(method, method_name);
method_name = sip_method_name((sip_method_t)method, method_name);
if (method_name == NULL)
return NULL;
......@@ -1298,7 +1298,7 @@ sip_cseq_t *sip_cseq_create(su_home_t *home,
if (cs) {
cs->cs_seq = seq;
cs->cs_method = method;
cs->cs_method = (sip_method_t)method;
if (!method)
method_name = strcpy((char *)(cs + 1), method_name);
cs->cs_method_name = method_name;
......
......@@ -244,9 +244,11 @@ int sip_version_d(char **ss, char const **ver)
result = s;
l1 = span_token(s);
for (n = l1; IS_LWS(s[n]); n++);
for (n = l1; IS_LWS(s[n]); n++)
{}
if (s[n] == '/') {
for (n++; IS_LWS(s[n]); n++);
for (n++; IS_LWS(s[n]); n++)
{}
l2 = span_token(s + n);
n += l2;
}
......@@ -436,7 +438,7 @@ sip_method_t sip_method_d(char **ss, char const **return_name)
*ss = (s + n);
if (return_name) *return_name = name;
return code;
return (sip_method_t)code;
}
/** Get method enum corresponding to method name */
......
......@@ -86,7 +86,8 @@ int sip_prefs_parse(union sip_pref *sp,
*in_out_s = s + strlen(s);
return 1;
} else if (s[0] == '"' && s[1] != '\0') {
for (s++; IS_LWS(s[0]); s++);
for (s++; IS_LWS(s[0]); s++)
{}
} else
old_type = sp_error;
} else if (!s[0]) {
......@@ -98,14 +99,16 @@ int sip_prefs_parse(union sip_pref *sp,
return 0;
if ((*return_negation = s[0] == '!'))
for (s++; IS_LWS(s[0]); s++);
for (s++; IS_LWS(s[0]); s++)
{}
if (*s == '#') {
/* Numeric */
double n1, n2;
char s0, *e;
for (s++; IS_LWS(s[0]); s++);
for (s++; IS_LWS(s[0]); s++)
{}
s0 = s[0];
......@@ -143,10 +146,12 @@ int sip_prefs_parse(union sip_pref *sp,
s += n;
}
for (; IS_LWS(s[0]); s++);
for (; IS_LWS(s[0]); s++)
{}
if (s[0] == ',' || (s[0] == '"' && s[1] == '\0'))
for (s++; IS_LWS(s[0]); s++);
for (s++; IS_LWS(s[0]); s++)
{}
else
old_type = sp_error;
......
......@@ -544,7 +544,7 @@ int soa_base_set_params(soa_session_t *ss, tagi_t const *tags)
|| srtp_integrity != (int)ss->ss_srtp_integrity
;
ss->ss_af = af;
ss->ss_af = (enum soa_af)af;
ss->ss_rtp_select = rtp_select;
ss->ss_rtp_sort = rtp_sort;
......@@ -2300,7 +2300,7 @@ soa_init_sdp_connection_with_session(soa_session_t *ss,
if (c->c_nettype != sdp_net_in ||
(c->c_addrtype != sdp_addr_ip4 && c->c_addrtype != sdp_addr_ip6)) {
c->c_nettype = sdp_net_in, c->c_addrtype = 0;
c->c_nettype = sdp_net_in, c->c_addrtype = (sdp_addrtype_e)0;
c->c_address = strcpy(buffer, "");
}
......@@ -2323,7 +2323,7 @@ soa_init_sdp_connection_with_session(soa_session_t *ss,
if (ip4 && ip6) {
/* Prefer address family already used in session, if any */
sdp_addrtype_e addrtype = 0;
sdp_addrtype_e addrtype = (sdp_addrtype_e)0;
char const *because = "error";
if (sdp && sdp->sdp_connection &&
......
......@@ -725,9 +725,9 @@ int soa_sdp_upgrade(soa_session_t *ss,
if (session == NULL || user == NULL)
return (errno = EFAULT), -1;
Ns = sdp_media_count(session, sdp_media_any, 0, 0, 0);
Nu = sdp_media_count(user, sdp_media_any, 0, 0, 0);
Nr = sdp_media_count(remote, sdp_media_any, 0, 0, 0);
Ns = sdp_media_count(session, sdp_media_any, (sdp_text_t)0, (sdp_proto_e)0, (sdp_text_t)0);
Nu = sdp_media_count(user, sdp_media_any, (sdp_text_t)0, (sdp_proto_e)0, (sdp_text_t)0);
Nr = sdp_media_count(remote, sdp_media_any, (sdp_text_t)0, (sdp_proto_e)0, (sdp_text_t)0);
if (remote == NULL)
Nmax = Ns + Nu;
......@@ -1044,29 +1044,29 @@ int soa_sdp_mode_set(sdp_session_t const *user,
continue;
}
send_mode = um->m_mode & sdp_sendonly;
send_mode = (sdp_mode_t)(um->m_mode & sdp_sendonly);
if (rm)
send_mode = (rm->m_mode & sdp_recvonly) ? sdp_sendonly : 0;
recv_mode = um->m_mode & sdp_recvonly;
recv_mode = (sdp_mode_t)(um->m_mode & sdp_recvonly);
if (rm && rm->m_mode == sdp_inactive) {
send_mode = recv_mode = 0;
send_mode = recv_mode = (sdp_mode_t)0;
}
else if (inactive_all) {
send_mode = recv_mode = 0;
send_mode = recv_mode = (sdp_mode_t)0;
}
else if (hold_all) {
recv_mode = 0;
recv_mode = (sdp_mode_t)0;
}
else if (hold && (hold_media = su_strcasestr(hold, sm->m_type_name))) {
recv_mode = 0;
recv_mode = (sdp_mode_t)0;
hold_media += strlen(sm->m_type_name);
hold_media += strspn(hold_media, " \t");
if (hold_media[0] == '=') {
hold_media += strspn(hold, " \t");
if (su_casenmatch(hold_media, "inactive", strlen("inactive")))
recv_mode = send_mode = 0;
recv_mode = send_mode = (sdp_mode_t)0;
}
}
......@@ -1140,8 +1140,8 @@ static int offer_answer_step(soa_session_t *ss,
if (local && remote) switch (action) {
case generate_answer:
case process_answer:
if (sdp_media_count(remote, sdp_media_any, "*", 0, 0) <
sdp_media_count(local, sdp_media_any, "*", 0, 0)) {
if (sdp_media_count(remote, sdp_media_any, "*", (sdp_proto_e)0, (sdp_text_t)0) <
sdp_media_count(local, sdp_media_any, "*", (sdp_proto_e)0, (sdp_text_t)0)) {
SU_DEBUG_5(("%s: remote %s is truncated: expanding\n",
by, action == generate_answer ? "offer" : "answer"));
remote = soa_sdp_expand_media(tmphome, remote, local);
......
......@@ -316,7 +316,7 @@ sres_sip_new(sres_resolver_t *sres,
if (numeric) {
naptr = 0, srv = 0;
if (!port || !strlen(port))
port = url_port_default(u->url_type);
port = url_port_default((enum url_type_e)u->url_type);
}
/* RFC 3263:
......
......@@ -733,7 +733,7 @@ void *su_home_clone(su_home_t *parent, isize_t size)
if (parent) {
su_block_t *sub = MEMLOCK(parent);
home = sub_alloc(parent, sub, size, 2);
home = sub_alloc(parent, sub, size, (enum sub_zero)2);
UNLOCK(parent);
}
else {
......@@ -781,7 +781,7 @@ void *su_alloc(su_home_t *home, isize_t size)
void *data;
if (home) {
data = sub_alloc(home, MEMLOCK(home), size, 0);
data = sub_alloc(home, MEMLOCK(home), size, (enum sub_zero)0);
UNLOCK(home);
}
else
......@@ -1304,7 +1304,7 @@ void *su_realloc(su_home_t *home, void *data, isize_t size)
sub = MEMLOCK(home);
if (!data) {
data = sub_alloc(home, sub, size, 0);
data = sub_alloc(home, sub, size, (enum sub_zero)0);
UNLOCK(home);
return data;
}
......@@ -1468,7 +1468,7 @@ void *su_zalloc(su_home_t *home, isize_t size)
assert (size >= 0);
if (home) {
data = sub_alloc(home, MEMLOCK(home), size, 1);
data = sub_alloc(home, MEMLOCK(home), size, (enum sub_zero)1);
UNLOCK(home);
}
else
......@@ -1518,7 +1518,7 @@ void *su_salloc(su_home_t *home, isize_t size)
return (void)(errno = ENOMEM), NULL;
if (home) {
retval = sub_alloc(home, MEMLOCK(home), size, 1);
retval = sub_alloc(home, MEMLOCK(home), size, (enum sub_zero)1);
UNLOCK(home);
}
else
......
......@@ -1513,9 +1513,9 @@ int tport_tbind(tport_t *self,
server = 0;
if (server)
retval = tport_bind_server(mr, mytpn, transports, public, ta_args(ta));
retval = tport_bind_server(mr, mytpn, transports, (enum tport_via)public, ta_args(ta));
else
retval = tport_bind_client(mr, mytpn, transports, public, ta_args(ta));
retval = tport_bind_client(mr, mytpn, transports, (enum tport_via)public, ta_args(ta));
ta_end(ta);
......@@ -4678,7 +4678,7 @@ int tport_name_by_url(su_home_t *home,
return -1;
}
tpn->tpn_proto = url_tport_default(url->url_type);
tpn->tpn_proto = url_tport_default((enum url_type_e)url->url_type);
tpn->tpn_canon = url->url_host;
tpn->tpn_host = url->url_host;
tpn->tpn_port = url_port(url);
......
......@@ -393,7 +393,7 @@ void tport_recv_timeout_timer(tport_t *self, su_time_t now)
if (self->tp_msg &&
su_time_cmp(su_time_add(self->tp_rtime, timeout), now) < 0) {
msg_t *msg = self->tp_msg;
msg_set_streaming(msg, 0);
msg_set_streaming(msg, (enum msg_streaming_status)0);
msg_set_flags(msg, MSG_FLG_ERROR | MSG_FLG_TRUNC | MSG_FLG_TIMEOUT);
tport_deliver(self, msg, NULL, NULL, now);
self->tp_msg = NULL;
......
......@@ -224,7 +224,7 @@ SOFIAPUBFUN char const *url_port(url_t const *u);
/** Return the URL port string, using default port if none present. */
#define URL_PORT(u) \
((u) && (u)->url_port ? (u)->url_port : \
url_port_default((u) ? (u)->url_type : url_any))
url_port_default((u) ? (enum url_type_e)(u)->url_type : url_any))
/* ---------------------------------------------------------------------- */
/* url_string_t handling */
......
......@@ -501,7 +501,7 @@ void url_init(url_t *url, enum url_type_e type)
memset(url, 0, sizeof(*url));
url->url_type = type;
if (type > url_unknown) {
char const *scheme = url_scheme(url->url_type);
char const *scheme = url_scheme((enum url_type_e)url->url_type);
if (scheme)
url->url_scheme = scheme;
}
......@@ -593,7 +593,7 @@ int _url_d(url_t *url, char *s)
url->url_type = url_get_type(url->url_scheme, n);
have_authority = !url_type_is_opaque(url->url_type);
have_authority = !url_type_is_opaque((enum url_type_e)url->url_type);
}
else {
url->url_type = url_unknown;
......@@ -1135,7 +1135,7 @@ issize_t url_dup(char *buf, isize_t bufsize, url_t *dst, url_t const *src)
srcp = &src->url_scheme;
if (dst->url_type > url_unknown)
*dstp = url_scheme(dst->url_type);
*dstp = url_scheme((enum url_type_e)dst->url_type);
if (*dstp != NULL)
dstp++, srcp++; /* Skip scheme if it is constant */
......@@ -1591,9 +1591,9 @@ int url_cmp(url_t const *a, url_t const *b)
char const *b_port;
if (url_type != url_sip && url_type != url_sips)
a_port = b_port = url_port_default(url_type);
a_port = b_port = url_port_default((enum url_type_e)url_type);
else if (host_is_ip_address(a->url_host))
a_port = b_port = url_port_default(url_type);
a_port = b_port = url_port_default((enum url_type_e)url_type);
else
a_port = b_port = "";
......@@ -1702,9 +1702,9 @@ int url_cmp_all(url_t const *a, url_t const *b)
char const *b_port;
if (url_type != url_sip && url_type != url_sips)
a_port = b_port = url_port_default(url_type);