]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
trivial compiler warnings
authorJeff Lenk <jeff@jefflenk.com>
Sun, 29 May 2011 14:46:02 +0000 (09:46 -0500)
committerJeff Lenk <jeff@jefflenk.com>
Sun, 29 May 2011 14:46:02 +0000 (09:46 -0500)
src/mod/endpoints/mod_sofia/mod_sofia.c
src/mod/endpoints/mod_sofia/mod_sofia.h
src/mod/endpoints/mod_sofia/sofia_glue.c
src/mod/endpoints/mod_sofia/sofia_reg.c

index fbff334ab285696d893c65460118251999ad8085..16a24df9bdf386bf01c8e59c13c71d03ca2e422e 100644 (file)
@@ -1345,7 +1345,7 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
        case SWITCH_MESSAGE_INDICATE_JITTER_BUFFER:
                {
                        if (switch_rtp_ready(tech_pvt->rtp_session)) {
-                               int len, maxlen = 0, qlen = 0, maxqlen = 50, max_drift = 0;
+                               int len = 0, maxlen = 0, qlen = 0, maxqlen = 50, max_drift = 0;
 
                                if (msg->string_arg) {
                                        char *p, *q;
@@ -1626,7 +1626,7 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
                        ip = switch_channel_get_variable(channel, SWITCH_REMOTE_MEDIA_IP_VARIABLE);
                        port = switch_channel_get_variable(channel, SWITCH_REMOTE_MEDIA_PORT_VARIABLE);
                        if (ip && port) {
-                               sofia_glue_set_local_sdp(tech_pvt, ip, atoi(port), msg->string_arg, 1);
+                               sofia_glue_set_local_sdp(tech_pvt, ip, (switch_port_t)atoi(port), msg->string_arg, 1);
                        }
 
                        if (!sofia_test_flag(tech_pvt, TFLAG_BYE)) {
@@ -1666,7 +1666,7 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
                                port = switch_channel_get_variable(other_channel, SWITCH_REMOTE_MEDIA_PORT_VARIABLE);
                                switch_core_session_rwunlock(other_session);
                                if (ip && port) {
-                                       sofia_glue_set_local_sdp(tech_pvt, ip, atoi(port), NULL, 1);
+                                       sofia_glue_set_local_sdp(tech_pvt, ip, (switch_port_t)atoi(port), NULL, 1);
                                }
                        }
 
index 65404050e4ffb7148e6954a8809ed61fce147e85..8e1c43d1dff1fca4ce40f7b67b20ade5184a3ebf 100644 (file)
@@ -795,7 +795,7 @@ switch_status_t sofia_glue_activate_rtp(private_object_t *tech_pvt, switch_rtp_f
 
 void sofia_glue_deactivate_rtp(private_object_t *tech_pvt);
 
-void sofia_glue_set_local_sdp(private_object_t *tech_pvt, const char *ip, uint32_t port, const char *sr, int force);
+void sofia_glue_set_local_sdp(private_object_t *tech_pvt, const char *ip, switch_port_t port, const char *sr, int force);
 
 void sofia_glue_tech_prepare_codecs(private_object_t *tech_pvt);
 
@@ -1065,6 +1065,6 @@ void sofia_glue_proxy_codec(switch_core_session_t *session, const char *r_sdp);
 switch_status_t sofia_glue_sdp_map(const char *r_sdp, switch_event_t **fmtp, switch_event_t **pt);
 void sofia_glue_build_vid_refresh_message(switch_core_session_t *session, const char *pl);
 void sofia_glue_check_dtmf_type(private_object_t *tech_pvt);
-void sofia_glue_parse_rtp_bugs(uint32_t *flag_pole, const char *str);
+void sofia_glue_parse_rtp_bugs(switch_rtp_bug_flag_t *flag_pole, const char *str);
 char *sofia_glue_gen_contact_str(sofia_profile_t *profile, sip_t const *sip, sofia_nat_parse_t *np);
 void sofia_glue_pause_jitterbuffer(switch_core_session_t *session, switch_bool_t on);
index 8af77a17d77fb2e926b5b7e673537df19f161a86..e1b4ac70112a4fde236873a775708fb2e769b2ef 100644 (file)
@@ -358,7 +358,7 @@ void sofia_glue_check_dtmf_type(private_object_t *tech_pvt)
 }
 
 
-void sofia_glue_set_local_sdp(private_object_t *tech_pvt, const char *ip, uint32_t port, const char *sr, int force)
+void sofia_glue_set_local_sdp(private_object_t *tech_pvt, const char *ip, switch_port_t port, const char *sr, int force)
 {
        char buf[2048];
        int ptime = 0;
@@ -3579,7 +3579,7 @@ static void add_audio_codec(sdp_rtpmap_t *map, int ptime, char *buf, switch_size
                codec_ms = switch_default_ptime(map->rm_encoding, map->rm_pt);
        }
 
-       map_bit_rate = switch_known_bitrate(map->rm_pt);
+       map_bit_rate = switch_known_bitrate((switch_payload_t)map->rm_pt);
                                
        if (!ptime && !strcasecmp(map->rm_encoding, "g723")) {
                ptime = codec_ms = 30;
@@ -4649,7 +4649,7 @@ uint8_t sofia_glue_negotiate_sdp(switch_core_session_t *session, const char *r_s
                                        codec_ms = switch_default_ptime(rm_encoding, map->rm_pt);
                                }
 
-                               map_bit_rate = switch_known_bitrate(map->rm_pt);
+                               map_bit_rate = switch_known_bitrate((switch_payload_t)map->rm_pt);
                                
                                if (!ptime && !strcasecmp(map->rm_encoding, "g723")) {
                                        ptime = codec_ms = 30;
@@ -4765,7 +4765,7 @@ uint8_t sofia_glue_negotiate_sdp(switch_core_session_t *session, const char *r_s
                                        switch_snprintf(tmp, sizeof(tmp), "%d", tech_pvt->remote_sdp_audio_port);
                                        switch_channel_set_variable(tech_pvt->channel, SWITCH_REMOTE_MEDIA_IP_VARIABLE, tech_pvt->remote_sdp_audio_ip);
                                        switch_channel_set_variable(tech_pvt->channel, SWITCH_REMOTE_MEDIA_PORT_VARIABLE, tmp);
-                                       tech_pvt->audio_recv_pt = map->rm_pt;
+                                       tech_pvt->audio_recv_pt = (switch_payload_t)map->rm_pt;
                                        
                                        if (switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_OUTBOUND && !sofia_test_flag(tech_pvt, TFLAG_REINVITE)) {
                                                sofia_glue_get_offered_pt(tech_pvt, mimp, &tech_pvt->audio_recv_pt);
@@ -4889,7 +4889,7 @@ uint8_t sofia_glue_negotiate_sdp(switch_core_session_t *session, const char *r_s
                                                switch_channel_set_variable(tech_pvt->channel, "sip_video_pt", tmp);
                                                sofia_glue_check_video_codecs(tech_pvt);
 
-                                               tech_pvt->video_recv_pt = map->rm_pt;
+                                               tech_pvt->video_recv_pt = (switch_payload_t)map->rm_pt;
                                                
                                                if (switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_OUTBOUND) {
                                                        sofia_glue_get_offered_pt(tech_pvt, mimp, &tech_pvt->video_recv_pt);
@@ -5458,13 +5458,13 @@ static int recover_callback(void *pArg, int argc, char **argv, char **columnName
                        
                        if (switch_rtp_ready(tech_pvt->rtp_session)) {
                                if ((tmp = switch_channel_get_variable(channel, "sip_audio_recv_pt"))) {
-                                       switch_rtp_set_recv_pt(tech_pvt->rtp_session, atoi(tmp));
+                                       switch_rtp_set_recv_pt(tech_pvt->rtp_session, (switch_payload_t)atoi(tmp));
                                }
                        }
 
                        if (switch_rtp_ready(tech_pvt->video_rtp_session)) {
                                if ((tmp = switch_channel_get_variable(channel, "sip_video_recv_pt"))) {
-                                       switch_rtp_set_recv_pt(tech_pvt->rtp_session, atoi(tmp));
+                                       switch_rtp_set_recv_pt(tech_pvt->rtp_session, (switch_payload_t)atoi(tmp));
                                }
                        }
 
@@ -6415,7 +6415,7 @@ void sofia_glue_build_vid_refresh_message(switch_core_session_t *session, const
 }
 
 
-void sofia_glue_parse_rtp_bugs(uint32_t *flag_pole, const char *str)
+void sofia_glue_parse_rtp_bugs(switch_rtp_bug_flag_t *flag_pole, const char *str)
 {
 
        if (switch_stristr("clear", str)) {
index c757a9e43e0676db91e66668b436b5fbe21d4f82..fa837eb83054abb5b9b904f0f529c10d5284b15f 100644 (file)
@@ -1050,7 +1050,7 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand
        }
 
        if (authorization) {
-               char *v_contact_str;
+               char *v_contact_str = NULL;
                const char *username = "unknown";
                const char *realm = reg_host;
                if ((auth_res = sofia_reg_parse_auth(profile, authorization, sip, sip->sip_request->rq_method_name,