]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fixing 32bit specific print warnings
authorroot <root@nsg-media-test.sangoma.local>
Wed, 25 Jul 2012 14:53:07 +0000 (10:53 -0400)
committerroot <root@nsg-media-test.sangoma.local>
Wed, 25 Jul 2012 14:53:07 +0000 (10:53 -0400)
src/mod/endpoints/mod_media_gateway/media_gateway_cmd_handler.c
src/mod/endpoints/mod_media_gateway/media_gateway_utils.c
src/mod/endpoints/mod_media_gateway/mod_media_gateway.c

index 55da9a37570dbe36cf0cfc3497bcde009728aa41..37effcbe95215a10e0124cbe121b2f201514f91d 100644 (file)
@@ -778,9 +778,15 @@ switch_status_t handle_mg_modify_cmd(megaco_profile_t* mg_profile, MgMgcoCommand
        /********************************************************************/
     } else if(MGT_TERMID_OTHER == termId->type.val){
         /********************************************************************/
+#ifdef BIT_64
         switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO,
                 "Modify request is for termination[%s] and context: type[%d], value[%d] \n", 
                 termId->name.lcl.val, ctxtId->type.val, ctxtId->val.val);
+#else
+        switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO,
+                "Modify request is for termination[%s] and context: type[%d], value[%ld] \n", 
+                termId->name.lcl.val, ctxtId->type.val, ctxtId->val.val);
+#endif
 
         term = megaco_find_termination(mg_profile, (char*)termId->name.lcl.val);
 
@@ -976,7 +982,11 @@ switch_status_t handle_mg_subtract_cmd(megaco_profile_t* mg_profile, MgMgcoComma
 
     if (MGT_CXTID_OTHER == ctxtId->type.val){
 
+#ifdef BIT_64
         switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO," SUB Request for Context[%d] \n", ctxtId->val.val);
+#else
+        switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO," SUB Request for Context[%ld] \n",  ctxtId->val.val);
+#endif
 
         /*find context based on received context-id */
         mg_ctxt = megaco_get_context(mg_profile, ctxtId->val.val);
index d52182300554025a873168276a383f2f7c60f82d..e8788ea6f275c11befbd025aadb2598a826d5d6b 100644 (file)
@@ -456,8 +456,13 @@ void mgco_print_sdp_attr_set(CmSdpAttrSet *s)
                     }
                 case CM_SDP_ATTR_PTIME:
                     {
+#ifdef BIT_64
                         switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "\t PTIME  = %d \n", 
                                 (NOTPRSNT != a->u.ptime.pres)?a->u.ptime.val:-1);
+#else
+                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "\t PTIME  = %ld \n", 
+                                (NOTPRSNT != a->u.ptime.pres)?a->u.ptime.val:-1);
+#endif
                         break;
                     }
                 case CM_SDP_ATTR_RECVONLY:
@@ -537,8 +542,13 @@ void mgco_print_sdp_attr_set(CmSdpAttrSet *s)
                             switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "\t Encoding Name name = %s \n",
                                     (NOTPRSNT != r->enc.name.pres)?(char*)r->enc.name.val:"Not Present");
 
+#ifdef BIT_64
                             switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "\t Clock Rate = %d \n",
                                     (NOTPRSNT != r->clk.pres)?r->clk.val:-1);
+#else
+                            switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "\t Clock Rate = %ld \n",
+                                    (NOTPRSNT != r->clk.pres)?r->clk.val:-1);
+#endif
 
                             switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "\t Encoding Parameters = %s \n",
                                     (NOTPRSNT != r->parms.pres)?(char*)r->parms.val:"Not Present");
index 4394a8618478c3420901935ed47e91ddb135bf82..2cd68716bea5d477d71aa07ba3695d67c83dd40e 100644 (file)
@@ -518,7 +518,11 @@ void handle_mgco_cmd_ind(Pst *pst, SuId suId, MgMgcoCommand* cmd)
        }else if(MGT_CXTID_OTHER == inc_context->type.pres){
 
                if(NOTPRSNT != inc_context->val.pres){
+#ifdef BIT_64
                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO,"Context specific request for contextId[%d]\n",inc_context->val.val);
+#else
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO,"Context specific request for contextId[%ld]\n",inc_context->val.val);
+#endif
                        /* check if context present with us */
                        if(NULL == megaco_find_context_by_suid(suId, inc_context->val.val)){
                                goto ctxt_error;
@@ -613,11 +617,19 @@ void handle_mgco_cmd_ind(Pst *pst, SuId suId, MgMgcoCommand* cmd)
                        }
                case CH_CMD_TYPE_CFM:
                        {
-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Received Command txn[%d] Response/Confirmation \n",txn_id);
+#ifdef BIT_64
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Received Command txn[%d] Response/Confirmation \n",txn_id);
+#else
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Received Command txn[%ld] Response/Confirmation \n",txn_id);
+#endif
                                break;
                        }
                default:
+#ifdef BIT_64
                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Invalid command type[%d]\n",cmd->cmdType.val);
+#else
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Invalid command type[%d]\n",cmd->cmdType.val);
+#endif
                        return;
        }