]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Mon Jun 29 07:52:27 CDT 2009 kai.k.samposalo@nokia.com
authorMichael Jerris <mike@jerris.com>
Fri, 10 Jul 2009 00:54:04 +0000 (00:54 +0000)
committerMichael Jerris <mike@jerris.com>
Fri, 10 Jul 2009 00:54:04 +0000 (00:54 +0000)
  * Symbian winscw build fix

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14193 d0543943-73ff-0310-b7d9-9358b9ac24b2

27 files changed:
libs/sofia-sip/.update
libs/sofia-sip/libsofia-sip-ua/http/http_parser.c
libs/sofia-sip/libsofia-sip-ua/msg/msg_mime.c
libs/sofia-sip/libsofia-sip-ua/msg/msg_parser.c
libs/sofia-sip/libsofia-sip-ua/msg/msg_parser_util.c
libs/sofia-sip/libsofia-sip-ua/nta/nta.c
libs/sofia-sip/libsofia-sip-ua/nth/nth_client.c
libs/sofia-sip/libsofia-sip-ua/nth/nth_server.c
libs/sofia-sip/libsofia-sip-ua/nua/nua_client.c
libs/sofia-sip/libsofia-sip-ua/nua/nua_event_server.c
libs/sofia-sip/libsofia-sip-ua/nua/nua_notifier.c
libs/sofia-sip/libsofia-sip-ua/nua/nua_params.c
libs/sofia-sip/libsofia-sip-ua/nua/nua_server.c
libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.c
libs/sofia-sip/libsofia-sip-ua/nua/nua_subnotref.c
libs/sofia-sip/libsofia-sip-ua/nua/outbound.c
libs/sofia-sip/libsofia-sip-ua/sip/sip_basic.c
libs/sofia-sip/libsofia-sip-ua/sip/sip_parser.c
libs/sofia-sip/libsofia-sip-ua/sip/sip_pref_util.c
libs/sofia-sip/libsofia-sip-ua/soa/soa.c
libs/sofia-sip/libsofia-sip-ua/soa/soa_static.c
libs/sofia-sip/libsofia-sip-ua/sresolv/sres_sip.c
libs/sofia-sip/libsofia-sip-ua/su/su_alloc.c
libs/sofia-sip/libsofia-sip-ua/tport/tport.c
libs/sofia-sip/libsofia-sip-ua/tport/tport_type_tcp.c
libs/sofia-sip/libsofia-sip-ua/url/sofia-sip/url.h
libs/sofia-sip/libsofia-sip-ua/url/url.c

index d97d7d98848e41730d312b1c08ee862070a45124..7ad8d6d48d55bbd29dded51ba06de36db92ea8de 100644 (file)
@@ -1 +1 @@
-Thu Jul  9 19:50:55 CDT 2009
+Thu Jul  9 19:52:17 CDT 2009
index 629ebe0a0ac358c36d0f78fac1d1d6198393c475..09dd4d21d049fbaf328d69256769416006748dfc 100644 (file)
@@ -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 */
index 60d4a36c8294a7d58c976c713d857fe9c921fbe5..f2704e830a50594b7001b18e7a50b91f475df06c 100644 (file)
@@ -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;
   }
index bb25834e6280a4a36c0270aa600f77b69a857820..32257144f19eb268a7f1237d60e1526bdb913efa 100644 (file)
@@ -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)
index dcdeb2e5af64dfc721f96b7c5f95f07c09dd35a6..11fc1358ebf2ded2100e98f7f25c7e12caa93107 100644 (file)
@@ -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];
index ea40be9296d9d9f608f73881b664cf201e4d8b51..f52eacd6fb2711c454875693f4102ecb4949938c 100644 (file)
@@ -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),
index 22eb5b9bbdf1f9cc27f8184ff3ad134cd0443c3d..96442454fbad8e2bb6611b1347507e2a7ef980da 100644 (file)
@@ -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,
index 6dfdb7a18b89a34c5e67c79b4a19b59f176538db..4daed06520ed68aaaa4d27767e9875f4fe785712 100644 (file)
@@ -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;
       }
     }
index 10858eeecf35125c0b7f02e71e0fbc53931e8055..9facd8cd23094b0abe6cc0d938ae1c07f8374aaf 100644 (file)
@@ -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);
   }
@@ -1245,7 +1245,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 ||
@@ -1546,7 +1546,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;
index 60e62fe7f2b52e3a3d2190aea23bf17bd4320440..96a8059c21f3335dbcfe5cd8879c6765b75fbbed 100644 (file)
@@ -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 {
index a7b884b3e288f03b810afce457b8a5a58bd10d8d..263632bb9d166b29c2898fda8ca142392650563d 100644 (file)
@@ -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),
index 318a89124d1cd84678571442d77c41c207c44701..8f511796b0f8a8bb343f8529f621dd8ad12292e5 100644 (file)
@@ -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) {
index 840f1bf8783b558d24589d6a6ccd433339189790..f9649759da498dab5bcacaedf9aec2533caf589d 100644 (file)
@@ -685,7 +685,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);
   }
index 7f6479b95aee0ce7d80550b5500b3072841583f0..5d319ecf644d0cc9fa60dac9d6fd618583693f3a 100644 (file)
@@ -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);
 
index 768cf6d94b223c888de42636872d56cba95c316e..e41d0bb09d17def091de1820d48278ee27392297 100644 (file)
@@ -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());
index 4ab3036de72d3f1b5ee507cf7a004549b32cfc9f..ff3d20591db2c591b5a06cf2c8b0f2e14b534e29 100644 (file)
@@ -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;
 }
 
 
index e6489af7c0fdf1fbe45deaeec685a9ba270882d6..b3dd3c396ac5ce6820462f2cfaebb7bd7ef6fbe2 100644 (file)
@@ -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;
index 453f696c8aa76700f52a6b41993a9d0de5d8b82e..92abd70f770a10f23ac44eb5f6e01750c8ed3aed 100644 (file)
@@ -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 */
index 6300b9572487eba9e1c6c9e25fa7d88db44ff191..892d5d299d7b1a15dcd8d2878969c778b65503a0 100644 (file)
@@ -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;
 
index 92f1eab3bc2af11d73967b648688bb56270b7f76..de79e0f3a5bb7b34f2b82fe94fa2d4f8277c71f1 100644 (file)
@@ -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 &&
index d7e9da1ff8e923bdab956894803d255373779386..f397e7aaad1be6f120def4defd22d885c046785c 100644 (file)
@@ -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);
index 6f1d16bc409a1bf9e1379dcf44a3815ee05337a1..e6a91e160d4c7a21c5f7819bb990ec4c8a6dabbf 100644 (file)
@@ -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:
index 2d399b363353b4899318b7844ce46a2b50e67977..edc47e5da96a722ad158ead44068307a9e184eca 100644 (file)
@@ -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
index 0b6a0766f0982f79f54bf9960271a14f29757d0c..1b73848678259ce9a87545e987d2321417add409 100644 (file)
@@ -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);
index 138caf6960d0f732e4b3a127a325746ffd1c5d71..23ce467f36458e4e71ab843a552704215fa77350 100644 (file)
@@ -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;
index 68f1b5eb8bebfad721f2233ac48221a347b2b76b..caeb2133b0a5c336f5dcb4f61b75c4690ef329ba 100644 (file)
@@ -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 */
index f9d31b2ea6a7eb1de216d914af617265b6f6aed4..bef523e5c92c818179bdbb3620b642901286b39c 100644 (file)
@@ -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);
+      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 = "";
 
@@ -1863,7 +1863,7 @@ char const *url_port(url_t const *u)
     if (!host_is_ip_address(u->url_host))
       return "";
 
-  return url_port_default(u->url_type);
+  return url_port_default((enum url_type_e)u->url_type);
 }
 
 /** Sanitize URL.