diff --git a/src/mod/endpoints/mod_media_gateway/media_gateway_cmd_handler.c b/src/mod/endpoints/mod_media_gateway/media_gateway_cmd_handler.c index 55da9a3757..37effcbe95 100644 --- a/src/mod/endpoints/mod_media_gateway/media_gateway_cmd_handler.c +++ b/src/mod/endpoints/mod_media_gateway/media_gateway_cmd_handler.c @@ -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); diff --git a/src/mod/endpoints/mod_media_gateway/media_gateway_utils.c b/src/mod/endpoints/mod_media_gateway/media_gateway_utils.c index d521823005..e8788ea6f2 100644 --- a/src/mod/endpoints/mod_media_gateway/media_gateway_utils.c +++ b/src/mod/endpoints/mod_media_gateway/media_gateway_utils.c @@ -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"); diff --git a/src/mod/endpoints/mod_media_gateway/mod_media_gateway.c b/src/mod/endpoints/mod_media_gateway/mod_media_gateway.c index 4394a86184..2cd68716be 100644 --- a/src/mod/endpoints/mod_media_gateway/mod_media_gateway.c +++ b/src/mod/endpoints/mod_media_gateway/mod_media_gateway.c @@ -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; }