fixing 32bit specific print warnings

This commit is contained in:
root 2012-07-25 10:53:07 -04:00
parent e5821eeb79
commit dd0b514741
3 changed files with 33 additions and 1 deletions

View 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){ } else if(MGT_TERMID_OTHER == termId->type.val){
/********************************************************************/ /********************************************************************/
#ifdef BIT_64
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO,
"Modify request is for termination[%s] and context: type[%d], value[%d] \n", "Modify request is for termination[%s] and context: type[%d], value[%d] \n",
termId->name.lcl.val, ctxtId->type.val, ctxtId->val.val); 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); 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){ 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); 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 */ /*find context based on received context-id */
mg_ctxt = megaco_get_context(mg_profile, ctxtId->val.val); mg_ctxt = megaco_get_context(mg_profile, ctxtId->val.val);

View File

@ -456,8 +456,13 @@ void mgco_print_sdp_attr_set(CmSdpAttrSet *s)
} }
case CM_SDP_ATTR_PTIME: case CM_SDP_ATTR_PTIME:
{ {
#ifdef BIT_64
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "\t PTIME = %d \n", switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "\t PTIME = %d \n",
(NOTPRSNT != a->u.ptime.pres)?a->u.ptime.val:-1); (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; break;
} }
case CM_SDP_ATTR_RECVONLY: 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", 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"); (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", switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "\t Clock Rate = %d \n",
(NOTPRSNT != r->clk.pres)?r->clk.val:-1); (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", switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "\t Encoding Parameters = %s \n",
(NOTPRSNT != r->parms.pres)?(char*)r->parms.val:"Not Present"); (NOTPRSNT != r->parms.pres)?(char*)r->parms.val:"Not Present");

View 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){ }else if(MGT_CXTID_OTHER == inc_context->type.pres){
if(NOTPRSNT != inc_context->val.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); 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 */ /* check if context present with us */
if(NULL == megaco_find_context_by_suid(suId, inc_context->val.val)){ if(NULL == megaco_find_context_by_suid(suId, inc_context->val.val)){
goto ctxt_error; goto ctxt_error;
@ -613,11 +617,19 @@ void handle_mgco_cmd_ind(Pst *pst, SuId suId, MgMgcoCommand* cmd)
} }
case CH_CMD_TYPE_CFM: case CH_CMD_TYPE_CFM:
{ {
#ifdef BIT_64
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Received Command txn[%d] Response/Confirmation \n",txn_id); 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; break;
} }
default: default:
#ifdef BIT_64
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Invalid command type[%d]\n",cmd->cmdType.val); 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; return;
} }