From 56c8534827f980b773f20035d1385ed9f54160c7 Mon Sep 17 00:00:00 2001 From: David Yat Sin Date: Mon, 18 Jun 2012 14:34:12 -0400 Subject: [PATCH] Fixed compile issues again on 32-bit --- .../ftmod_sangoma_ss7/ftmod_sangoma_ss7_cli.c | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_cli.c b/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_cli.c index 620e4f3ece..80aad15ee8 100644 --- a/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_cli.c +++ b/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_cli.c @@ -3092,11 +3092,11 @@ static ftdm_status_t handle_show_m2ua_profiles(ftdm_stream_handle_t *stream) len = len + sprintf(buf + len, "\n"); #ifdef BIT_64 len = len + sprintf(buf + len, " %d \n", cfm.t.ssta.s.genSta.memSize); - len = len + sprintf(buf + len, " %d \n", (int64_t) cfm.t.ssta.s.genSta.memAlloc); + len = len + sprintf(buf + len, " %d \n", cfm.t.ssta.s.genSta.memAlloc); len = len + sprintf(buf + len, " %d \n", cfm.t.ssta.s.genSta.nmbClusters); #else len = len + sprintf(buf + len, " %ld \n", cfm.t.ssta.s.genSta.memSize); - len = len + sprintf(buf + len, " %ld \n", (int64_t) cfm.t.ssta.s.genSta.memAlloc); + len = len + sprintf(buf + len, " %ld \n", cfm.t.ssta.s.genSta.memAlloc); len = len + sprintf(buf + len, " %ld \n", cfm.t.ssta.s.genSta.nmbClusters); #endif len = len + sprintf(buf + len, " %d \n", cfm.t.ssta.s.genSta.nmbPeers); @@ -3314,7 +3314,11 @@ static ftdm_status_t handle_show_m2ua_profile(ftdm_stream_handle_t *stream, char len = len + sprintf(buf + len, " %s \n",g_ftdm_sngss7_data.cfg.g_m2ua_cfg.m2ua_peer[rsp.t.ssta.s.clusterSta.peerSt[idx].peerId].name); len = len + sprintf(buf + len," %s \n", PRNT_M2UA_PEER_STATE(cfm.t.ssta.s.peerSta.state)); len = len + sprintf(buf + len, " %d \n",cfm.t.ssta.s.peerSta.retryCount); - len = len + sprintf(buf + len, " %ld \n", (int64_t) cfm.t.ssta.s.peerSta.assocSta.spAssocId); +#ifdef BIT_64 + len = len + sprintf(buf + len, " %d \n", cfm.t.ssta.s.peerSta.assocSta.spAssocId); +#else + len = len + sprintf(buf + len, " %ld \n", cfm.t.ssta.s.peerSta.assocSta.spAssocId); +#endif len = len + sprintf(buf + len, " %s \n",(cfm.t.ssta.s.peerSta.assocSta.connected)?"CONNECTED":"NOT CONNECTED"); len = len + sprintf(buf + len, " %d \n",cfm.t.ssta.s.peerSta.assocSta.flcInProg); len = len + sprintf(buf + len, " %d \n",cfm.t.ssta.s.peerSta.assocSta.flcLevel); @@ -3332,7 +3336,11 @@ static ftdm_status_t handle_show_m2ua_profile(ftdm_stream_handle_t *stream, char len = len + sprintf(buf + len, "\n"); len = len + sprintf(buf + len," %s \n", PRNT_M2UA_SAP_STATE(cfm.t.ssta.s.sctSapSta.state)); len = len + sprintf(buf + len," %s \n", (cfm.t.ssta.s.sctSapSta.endpOpen)?"END_POINT_OPENED_SUCCESSFULLY":"END_POINT_NOT_OPEN"); - len = len + sprintf(buf + len," %ld \n", (int64_t) cfm.t.ssta.s.sctSapSta.spEndpId); +#ifdef BIT_64 + len = len + sprintf(buf + len," %d \n", cfm.t.ssta.s.sctSapSta.spEndpId); +#else + len = len + sprintf(buf + len," %ld \n", cfm.t.ssta.s.sctSapSta.spEndpId); +#endif len = len + sprintf(buf + len," %d \n", cfm.t.ssta.s.sctSapSta.nmbPrimRetry); len = len + sprintf(buf + len, "\n"); } @@ -3708,7 +3716,11 @@ static ftdm_status_t handle_show_nif_profiles(ftdm_stream_handle_t *stream) len = len + sprintf(buf + len, "\n"); len = len + sprintf(buf + len," %s \n", PRNT_NIF_SAP_STATE(cfm.t.ssta.s.dlSapSta.m2uaState)); len = len + sprintf(buf + len," %s \n", PRNT_NIF_SAP_STATE(cfm.t.ssta.s.dlSapSta.mtp2State)); +#ifdef BIT_64 len = len + sprintf(buf + len," %d \n", cfm.t.ssta.s.dlSapSta.nmbRetry); +#else + len = len + sprintf(buf + len," %ld \n", cfm.t.ssta.s.dlSapSta.nmbRetry); +#endif len = len + sprintf(buf + len, "\n"); }