]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
more pedantic standards?
authorMichael Jerris <mike@jerris.com>
Tue, 18 Dec 2012 16:01:51 +0000 (11:01 -0500)
committerMichael Jerris <mike@jerris.com>
Tue, 18 Dec 2012 16:01:51 +0000 (11:01 -0500)
32 files changed:
libs/sipcc/Makefile.am
libs/sipcc/core/ccapp/ccapp_task.c
libs/sipcc/core/ccapp/ccprovider.c
libs/sipcc/core/common/config_api.c
libs/sipcc/core/common/config_parser.c
libs/sipcc/core/common/misc.c
libs/sipcc/core/gsm/dcsm.c
libs/sipcc/core/gsm/fim.c
libs/sipcc/core/gsm/fsm.c
libs/sipcc/core/gsm/fsmb2bcnf.c
libs/sipcc/core/gsm/fsmcnf.c
libs/sipcc/core/gsm/fsmdef.c
libs/sipcc/core/gsm/fsmxfr.c
libs/sipcc/core/gsm/gsm.c
libs/sipcc/core/gsm/gsm_sdp.c
libs/sipcc/core/gsm/gsm_sdp_crypto.c
libs/sipcc/core/gsm/lsm.c
libs/sipcc/core/includes/CSFLog.h
libs/sipcc/core/includes/config.h
libs/sipcc/core/includes/debug.h
libs/sipcc/core/sdp/sdp_access.c
libs/sipcc/core/sdp/sdp_attr.c
libs/sipcc/core/sdp/sdp_attr_access.c
libs/sipcc/core/sdp/sdp_config.c
libs/sipcc/core/sdp/sdp_main.c
libs/sipcc/core/sdp/sdp_token.c
libs/sipcc/core/sdp/sdp_utils.c
libs/sipcc/core/sipstack/ccsip_pmh.c
libs/sipcc/core/sipstack/ccsip_sdp.c
libs/sipcc/cpr/common/cpr_string.c
libs/sipcc/cpr/darwin/cpr_darwin_ipc.c
libs/sipcc/cpr/darwin/cpr_darwin_socket.c

index a09220a6df8736deea5e5339941c3e2d461a8230..6b19ad46c197bcadfb343d26423cd8e1726f5ed1 100644 (file)
@@ -172,8 +172,8 @@ plat/csf2g/reset_api.c
 PLAT_DARWIN_SRC = plat/darwin/plat_api_stub.c
 #plat/darwin/netif.c
 
-libsipcc_la_CFLAGS = $(AM_CFLAGS)
-libsipcc_la_LDFLAGS = $(LIBS)
+libsipcc_la_CFLAGS = $(AM_CFLAGS)  $(SWITCH_AM_CFLAGS) 
+libsipcc_la_LDFLAGS = $(LIBS) $(PLATFORM_CORE_LDFLAGS)
 
 libsipcc_la_SOURCES = $(CORE_CCAPP_SRC) $(CORE_COMMON_SRC) $(GSM_SRC) $(CORE_SDP_SRC) $(CORE_SIPSTACK_SRC) $(CORE_SRCCOMMON_SRC) $(CPR_COMMON_SRC) $(PLAT_CSF2G_SRC)
 
index 0920c1a35f65bc974a5f9c5ecfb9825e47959f15..0b6ff6639ceea887f19fa9814fa55d576b999aa8 100644 (file)
@@ -162,7 +162,7 @@ void CCApp_task(void * arg)
 
             listener = getCcappListener(syshdr->Usr.UsrInfo);
             if (listener != NULL) {
-                (* ((appListener)(listener)))(msg, syshdr->Cmd);
+                (* ((listener)))(msg, syshdr->Cmd);
             } else {
                 CCAPP_DEBUG(DEB_F_PREFIX"Event[%d] doesn't have a dedicated listener.\n", DEB_F_PREFIX_ARGS(SIP_CC_PROV, fname),
                         syshdr->Usr.UsrInfo);
index 69bce566b718aebba198917e72bfc91ad37dca3f..2e5548bc3866ac55aa0360586a26153df8cacd80 100755 (executable)
@@ -279,6 +279,8 @@ cc_reg_state_t ccapp_get_state() {
    return gCCApp.state;
 }
 
+void ccp_handler(void* msg, int type);
+
 /**
  *
  * CCApp Provider init routine.
@@ -292,6 +294,7 @@ cc_reg_state_t ccapp_get_state() {
 void CCAppInit()
 {
   ccProvider_state_t srvcState;
+  appListener handler = ccp_handler;
 
     gCCApp.state = CC_CREATED_IDLE;
     gCCApp.cause = CC_CAUSE_NONE;
@@ -316,7 +319,7 @@ void CCAppInit()
   DEF_DEBUG(DEB_F_PREFIX"Add ccp listener: type%d", DEB_F_PREFIX_ARGS(SIP_CC_PROV, "CCAppInit"),
           CCAPP_CCPROVIER);
 
-  addCcappListener((appListener *)ccp_handler, CCAPP_CCPROVIER);
+  addCcappListener(&handler, CCAPP_CCPROVIER);
 
 }
 
index bd4d87c1cad7527fa0109977f6ee7ba76cc3f4d4..7007ddd61e92db05c3dccc679d1a1de64a7858e9 100755 (executable)
@@ -284,7 +284,7 @@ show_config_cmd (cc_int32_t argc, const char *argv[])
     char buf[MAX_CONFIG_VAL_PRINT_LEN];
     int i, feat;
 
-    debugif_printf("\n------ Current *Cache* Configuration ------\n");
+    debugif_printf("\n%s\n", "------ Current *Cache* Configuration ------");
     table = prot_cfg_table;
 
     for ( i=0; i < CFGID_LINE_FEATURE; i++ ) {
index 4f50fdd135e890b4e4aa755f67b45f924e5928d9..2637268b26fcb8a8c3b49949d2ee85b4c545136f 100644 (file)
@@ -57,6 +57,7 @@ extern accessory_cfg_info_t g_accessoryCfgInfo;
 static int gTransportLayerProtocol = 4;   //  4 = tcp, 2 = udp
 static boolean gP2PSIP = FALSE;
 static boolean gSDPMODE = FALSE;
+static boolean gRTPSAVPF = TRUE;           /* TRUE = RTP/SAVPF , FALSE = RTP/SAVP */
 static int gVoipControlPort = 5060;
 static int gCcm1_sip_port = 5060;
 
@@ -372,7 +373,7 @@ void config_set_ccm_ip_mac ()
 void config_setup_elements (const char *sipUser, const char *sipPassword, const char *sipDomain)
 {
     unsigned int i;
-    char buf[MAX_SIP_URL_LENGTH] = {'\0'};
+       //    char buf[MAX_SIP_URL_LENGTH] = {'\0'};
     char ip[MAX_SIP_URL_LENGTH] = {'\0'};
     char option[MAX_SIP_URL_LENGTH] = {'\0'};
     int line = 0;
index 0fe4bf19fffa6803d26646eff50fbfa98300d6de..fa264d5397850dd87cdd96afa2a5e2051ae16322 100644 (file)
 /* The number of arguments (argc) used in the show command */
 #define NUM_OF_SHOW_ARGUMENTS 2
 
+#if 0
 static int last_month = 99;
 static char last_month_str[MAX_NTP_MONTH_STR_LEN] = "";
 static const char *month_ar[MAX_NTP_MONTH_ARRAY_SIZE] = {
     "Jan", "Feb", "Mar", "Apr", "May", "Jun",
     "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
 };
+#endif
 
 /*--------------------------------------------------------------------------
  * External function prototypes
@@ -53,7 +55,7 @@ void SipNtpUpdateClockFromCCM(void);
  *--------------------------------------------------------------------------
  */
 
-
+#if 0
 /*
  * This function finds month (0 to 11) from month name
  * listed above in month_ar[]. This is used to convert the
@@ -84,7 +86,7 @@ set_month_from_str (char *month_str)
     }
     return (ret_val);
 }
-
+#endif
 
 
 /*
index 0139e64b29e90045fc328dcc74e3e43c3f3f3fc1..0484ef2d3afc672d453bc8781dbc32787dee2cb9 100755 (executable)
@@ -597,7 +597,7 @@ dcsm_show_cmd (cc_int32_t argc, const char *argv[])
      * check if need help
      */
     if ((argc == 2) && (argv[1][0] == '?')) {
-        debugif_printf("show dcsm\n");
+        debugif_printf("%s", "show dcsm\n");
         return (0);
     }
 
@@ -606,18 +606,18 @@ dcsm_show_cmd (cc_int32_t argc, const char *argv[])
         return(0);
     }
 
-    debugif_printf("\n-------------------------- DCSM Data --------------------------");
+    debugif_printf("%s", "\n-------------------------- DCSM Data --------------------------");
     debugif_printf("\nDCSM State = %s",dcsm_get_state_name(dcsm_cb.state));
-    debugif_printf("\nDCSM waiting calls \n");
+    debugif_printf("%s", "\nDCSM waiting calls \n");
 
     for (i=0; i< DCSM_MAX_CALL_IDS; i++) {
         if (dcsm_cb.call_ids[i] != CC_NO_CALL_ID) {
             debugif_printf("%d ", dcsm_cb.call_ids[i]);
         }
     }
-    debugif_printf("\n");
+    debugif_printf("%s", "\n");
 
-    debugif_printf("\nDCSM waiting events \n");
+    debugif_printf("%s", "\nDCSM waiting events \n");
     i = 0;
     msg_ptr = sll_next(dcsm_cb.s_msg_list, NULL);
     while (msg_ptr) {
@@ -637,7 +637,7 @@ dcsm_show_cmd (cc_int32_t argc, const char *argv[])
                         feat_msg ? cc_feature_name(feat_msg->feature_id):" ");
         }
     }
-    debugif_printf("\n-------------------------- DCSM Data Done-----------------------");
+    debugif_printf("%s", "\n-------------------------- DCSM Data Done-----------------------");
 
     return (0);
 }
index c435fbecb93f8ffedf57eea2eb129e130a156c44..4a176ed0ebdec4e45dd4ece25b95a2f82d93cade 100755 (executable)
@@ -594,14 +594,14 @@ fim_process_event (void *data, boolean cac_passed)
      * Skip the head.
      */
     icb = call_chn->next_icb;
-    MOZ_ASSERT(icb);
+    PR_ASSERT(icb);
     while (icb && !done) {
         /*
          * Set the required event data so the entity can process the event.
          */
         cb_hdr = (fim_cb_hdr_t *) (icb->cb);
 
-        MOZ_ASSERT(cb_hdr);
+        PR_ASSERT(cb_hdr);
         if (!cb_hdr) {
             done = TRUE;
             break;
@@ -708,15 +708,15 @@ fim_show_cmd (cc_int32_t argc, const char *argv[])
      * Check if need help.
      */
     if ((argc == 2) && (argv[1][0] == '?')) {
-        debugif_printf("show fim\n");
+        debugif_printf("%s", "show fim\n");
     }
 
     /*
      * Print the icbs.
      */
-    debugif_printf("\n---------------------------------- FIM icbs -----------------------------------");
-    debugif_printf("\ni   call_id  type    icb         next_chn    next_icb    cb          scb");
-    debugif_printf("\n-------------------------------------------------------------------------------\n");
+    debugif_printf("%s", "\n---------------------------------- FIM icbs -----------------------------------");
+    debugif_printf("%s", "\ni   call_id  type    icb         next_chn    next_icb    cb          scb");
+    debugif_printf("%s", "\n-------------------------------------------------------------------------------\n");
 
     FSM_FOR_ALL_CBS(icb, fim_icbs, FIM_MAX_ICBS) {
         debugif_printf("%-3d  %-7d  %-6s  0x%8p  0x%8p  0x%8p  0x%8p  0x%8p\n",
@@ -729,10 +729,10 @@ fim_show_cmd (cc_int32_t argc, const char *argv[])
      */
     i = 0;
     debugif_printf
-        ("\n------------------------ FIM scbs ------------------------");
-    debugif_printf("\ni   type    scb         sm          get_cb      free_cb");
+        ("%s", "\n------------------------ FIM scbs ------------------------");
+    debugif_printf("%s", "\ni   type    scb         sm          get_cb      free_cb");
     debugif_printf
-        ("\n----------------------------------------------------------\n");
+        ("%s", "\n----------------------------------------------------------\n");
 
     FSM_FOR_ALL_CBS(scb, fim_scbs, FIM_MAX_SCBS) {
         debugif_printf("%-2d  %-6s  0x%8p  0x%8p  0x%8p  0x%8p\n",
index ebc9f90838883899672fb4c11bb8250d93937d7c..c5f676a9ba775cc133909978056cba808a2a1502 100755 (executable)
@@ -368,23 +368,25 @@ cc_int32_t
 fsm_show_cmd (cc_int32_t argc, const char *argv[])
 {
     fsm_fcb_t      *fcb;
-    int             i = 0;
+       int             i = 0;
     void           *cb = NULL;
 
+       PR_ASSERT(i == 0);
+
     /*
      * check if need help
      */
     if ((argc == 2) && (argv[1][0] == '?')) {
-        debugif_printf("show fsm\n");
+        debugif_printf("%s", "show fsm\n");
         return 0;
     }
 
     /*
      * Print the fcbs
      */
-    debugif_printf("\n----------------------------- FSM fcbs -------------------------------");
-    debugif_printf("\ni    call_id  fcb         type       state      dcb         cb        ");
-    debugif_printf("\n----------------------------------------------------------------------\n");
+    debugif_printf("%s", "\n----------------------------- FSM fcbs -------------------------------");
+    debugif_printf("%s", "\ni    call_id  fcb         type       state      dcb         cb        ");
+    debugif_printf("%s", "\n----------------------------------------------------------------------\n");
 
     FSM_FOR_ALL_CBS(fcb, fsm_fcbs, FSM_MAX_FCBS) {
         switch (fcb->fsm_type) {
index e3c84f50736662bcd82205ee1ea9474cab3ea525..aa8423ab28f895273926db3afe63548d4086d4cb 100755 (executable)
@@ -1170,19 +1170,20 @@ cc_int32_t
 fsmb2bcnf_show_cmd (cc_int32_t argc, const char *argv[])
 {
     fsmcnf_ccb_t *ccb;
-    int           i = 0;
+       int           i = 0;
 
+       PR_ASSERT( i == 0 );
     /*
      * check if need help
      */
     if ((argc == 2) && (argv[1][0] == '?')) {
-        debugif_printf("show fsmb2bcnf\n");
+        debugif_printf("%s", "show fsmb2bcnf\n");
         return (0);
     }
 
-    debugif_printf("\n-------------------------- FSMB2BCNF ccbs --------------------------");
-    debugif_printf("\ni   b2bcnf_id  ccb         cnf_call_id  cns_call_id  active  bridged");
-    debugif_printf("\n--------------------------------------------------------------------"
+    debugif_printf("%s", "\n-------------------------- FSMB2BCNF ccbs --------------------------");
+    debugif_printf("%s", "\ni   b2bcnf_id  ccb         cnf_call_id  cns_call_id  active  bridged");
+    debugif_printf("%s", "\n--------------------------------------------------------------------"
          "\n");
 
     FSM_FOR_ALL_CBS(ccb, fsmb2bcnf_ccbs, FSMCNF_MAX_CCBS) {
index 7f92bfc3677641a46d7122c62f1f71e1da75e569..3f27e30eb1af8dec5e1d6b58c94406c00697ee9a 100755 (executable)
@@ -1656,17 +1656,18 @@ fsmcnf_show_cmd (cc_int32_t argc, const char *argv[])
     fsmcnf_ccb_t *ccb;
     int           i = 0;
 
+       PR_ASSERT(i == 0);
     /*
      * check if need help
      */
     if ((argc == 2) && (argv[1][0] == '?')) {
-        debugif_printf("show fsmcnf\n");
+        debugif_printf("%s", "show fsmcnf\n");
         return (0);
     }
 
-    debugif_printf("\n-------------------------- FSMCNF ccbs --------------------------");
-    debugif_printf("\ni   cnf_id  ccb         cnf_call_id  cns_call_id  active  bridged");
-    debugif_printf("\n-----------------------------------------------------------------"
+    debugif_printf("%s", "\n-------------------------- FSMCNF ccbs --------------------------");
+    debugif_printf("%s", "\ni   cnf_id  ccb         cnf_call_id  cns_call_id  active  bridged");
+    debugif_printf("%s", "\n-----------------------------------------------------------------"
          "\n");
 
     FSM_FOR_ALL_CBS(ccb, fsmcnf_ccbs, FSMCNF_MAX_CCBS) {
index 69e30df4d1db6fa3cc6726dfb54e706dc284b92c..2c35f3dadb3661eff6f23e493be4a869b3cef67e 100755 (executable)
@@ -2861,7 +2861,7 @@ fsmdef_ev_dialstring (sm_event_t *event)
  */
 static sm_rcs_t
 fsmdef_ev_createoffer (sm_event_t *event) {
-    sm_rcs_t            sm_rc;
+       //    sm_rcs_t            sm_rc;
     fsm_fcb_t           *fcb = (fsm_fcb_t *) event->data;
     fsmdef_dcb_t        *dcb = fcb->dcb;
     cc_causes_t         cause = CC_CAUSE_NORMAL;
@@ -2869,7 +2869,7 @@ fsmdef_ev_createoffer (sm_event_t *event) {
     cc_feature_t        *msg = (cc_feature_t *) event->msg;
     line_t              line = msg->line;
     callid_t            call_id = msg->call_id;
-    cc_causes_t         lsm_rc;
+       //    cc_causes_t         lsm_rc;
     int                 sdpmode = 0;
     char                *ufrag = NULL;
     char                *ice_pwd = NULL;
@@ -2961,7 +2961,7 @@ fsmdef_ev_createoffer (sm_event_t *event) {
  */
 static sm_rcs_t
 fsmdef_ev_createanswer (sm_event_t *event) {
-    sm_rcs_t            sm_rc;
+       //    sm_rcs_t            sm_rc;
     fsm_fcb_t           *fcb = (fsm_fcb_t *) event->data;
     fsmdef_dcb_t        *dcb = fcb->dcb;
     cc_feature_t        *msg = (cc_feature_t *) event->msg;
@@ -2969,12 +2969,12 @@ fsmdef_ev_createanswer (sm_event_t *event) {
     cc_msgbody_info_t   msg_body;
     line_t              line = msg->line;
     callid_t            call_id = msg->call_id;
-    line_t              free_line;
+       //    line_t              free_line;
     int                 sdpmode = 0;
-    const char          *called_number = "1234";
-    cc_causes_t         lsm_rc;
-    cc_msgbody_t        *part;
-    uint32_t            body_length;
+       //    const char          *called_number = "1234";
+       //    cc_causes_t         lsm_rc;
+       //    cc_msgbody_t        *part;
+       //    uint32_t            body_length;
     char                *ufrag = NULL;
     char                *ice_pwd = NULL;
     short               vcm_res;
@@ -3092,11 +3092,11 @@ fsmdef_ev_setlocaldesc(sm_event_t *event) {
     cc_causes_t         cause = CC_CAUSE_NORMAL;
     cc_msgbody_info_t   msg_body;
     int                 action = msg->action;
-    string_t            sdp = msg->sdp;
+       //    string_t            sdp = msg->sdp;
     int                 sdpmode = 0;
     callid_t            call_id = msg->call_id;
     line_t              line = msg->line;
-    cc_causes_t         lsm_rc;
+       //    cc_causes_t         lsm_rc;
 
     FSM_DEBUG_SM(DEB_F_PREFIX"Entered.\n", DEB_F_PREFIX_ARGS(FSM, __FUNCTION__));
 
@@ -3121,7 +3121,7 @@ fsmdef_ev_setlocaldesc(sm_event_t *event) {
 
         /* compare and fail if different:
          * anant: Why? The JS should be able to modify the SDP. Commenting out for now (same for answer)
-        if (strcmp(msg_body.parts[0].body, sdp) != 0) {
+        if (strcmp(msg_body.parts[0].body, msg->sdp) != 0) {
             ui_set_local_description(evSetLocalDescError, line, call_id, dcb->caller_id.call_instance_id, NULL, PC_SDPCHANGED);
             return (SM_RC_END);
         }
@@ -3140,7 +3140,7 @@ fsmdef_ev_setlocaldesc(sm_event_t *event) {
         }
 
         /* compare and fail if different
-        if (strcmp(msg_body.parts[0].body, sdp) != 0) {
+        if (strcmp(msg_body.parts[0].body, msg->sdp) != 0) {
             ui_set_local_description(evSetLocalDescError, line, call_id, dcb->caller_id.call_instance_id, NULL, PC_SDPCHANGED);
             return (SM_RC_END);
         }*/
@@ -3202,7 +3202,7 @@ fsmdef_ev_setremotedesc(sm_event_t *event) {
     int                 sdpmode = 0;
     callid_t            call_id = msg->call_id;
     line_t              line = msg->line;
-    cc_causes_t         lsm_rc;
+       //    cc_causes_t         lsm_rc;
     cc_msgbody_t        *part;
     uint32_t            body_length;
     cc_msgbody_info_t   msg_body;
@@ -3317,12 +3317,12 @@ static sm_rcs_t
 fsmdef_ev_localdesc(sm_event_t *event) {
     fsm_fcb_t           *fcb = (fsm_fcb_t *) event->data;
     fsmdef_dcb_t        *dcb = fcb->dcb;
-    cc_causes_t         cause = CC_CAUSE_NORMAL;
+       //    cc_causes_t         cause = CC_CAUSE_NORMAL;
     int                 sdpmode = 0;
-    cc_causes_t         lsm_rc;
-    cc_msgbody_t        *part;
-    uint32_t            body_length;
-    cc_msgbody_info_t   msg_body;
+       //    cc_causes_t         lsm_rc;
+       //    cc_msgbody_t        *part;
+       //    uint32_t            body_length;
+       //    cc_msgbody_info_t   msg_body;
 
     FSM_DEBUG_SM(DEB_F_PREFIX"Entered.\n", DEB_F_PREFIX_ARGS(FSM, __FUNCTION__));
 
@@ -3344,12 +3344,12 @@ static sm_rcs_t
 fsmdef_ev_remotedesc(sm_event_t *event) {
     fsm_fcb_t           *fcb = (fsm_fcb_t *) event->data;
     fsmdef_dcb_t        *dcb = fcb->dcb;
-    cc_causes_t         cause = CC_CAUSE_NORMAL;
+       //    cc_causes_t         cause = CC_CAUSE_NORMAL;
     int                 sdpmode = 0;
-    cc_causes_t         lsm_rc;
-    cc_msgbody_t        *part;
-    uint32_t            body_length;
-    cc_msgbody_info_t   msg_body;
+       //    cc_causes_t         lsm_rc;
+       //    cc_msgbody_t        *part;
+       //    uint32_t            body_length;
+       //    cc_msgbody_info_t   msg_body;
 
     FSM_DEBUG_SM(DEB_F_PREFIX"Entered.\n", DEB_F_PREFIX_ARGS(FSM, __FUNCTION__));
 
@@ -3372,7 +3372,7 @@ static sm_rcs_t
 fsmdef_ev_setpeerconnection(sm_event_t *event) {
     fsm_fcb_t           *fcb = (fsm_fcb_t *) event->data;
     fsmdef_dcb_t        *dcb = fcb->dcb;
-    cc_causes_t         cause = CC_CAUSE_NORMAL;
+       //    cc_causes_t         cause = CC_CAUSE_NORMAL;
     cc_feature_t        *msg = (cc_feature_t *) event->msg;
     callid_t            call_id = msg->call_id;
     int                 sdpmode = 0;
@@ -3420,13 +3420,13 @@ static sm_rcs_t
 fsmdef_ev_addstream(sm_event_t *event) {
     fsm_fcb_t           *fcb = (fsm_fcb_t *) event->data;
     fsmdef_dcb_t        *dcb = fcb->dcb;
-    cc_causes_t         cause = CC_CAUSE_NORMAL;
+       //    cc_causes_t         cause = CC_CAUSE_NORMAL;
     cc_feature_t        *msg = (cc_feature_t *) event->msg;
-    int                 sdpmode = 0;
-    cc_causes_t         lsm_rc;
-    cc_msgbody_t        *part;
-    uint32_t            body_length;
-    cc_msgbody_info_t   msg_body;
+       int                 sdpmode = 0;
+       //    cc_causes_t         lsm_rc;
+       //    cc_msgbody_t        *part;
+       //    uint32_t            body_length;
+       //    cc_msgbody_info_t   msg_body;
 
     FSM_DEBUG_SM(DEB_F_PREFIX"Entered.\n", DEB_F_PREFIX_ARGS(FSM, __FUNCTION__));
 
@@ -3466,13 +3466,13 @@ static sm_rcs_t
 fsmdef_ev_removestream(sm_event_t *event) {
     fsm_fcb_t           *fcb = (fsm_fcb_t *) event->data;
     fsmdef_dcb_t        *dcb = fcb->dcb;
-    cc_causes_t         cause = CC_CAUSE_NORMAL;
+       //    cc_causes_t         cause = CC_CAUSE_NORMAL;
     cc_feature_t        *msg = (cc_feature_t *) event->msg;
     int                 sdpmode = 0;
-    cc_causes_t         lsm_rc;
-    cc_msgbody_t        *part;
-    uint32_t            body_length;
-    cc_msgbody_info_t   msg_body;
+       //    cc_causes_t         lsm_rc;
+       //    cc_msgbody_t        *part;
+       //    uint32_t            body_length;
+       //    cc_msgbody_info_t   msg_body;
 
     FSM_DEBUG_SM(DEB_F_PREFIX"Entered.\n", DEB_F_PREFIX_ARGS(FSM, __FUNCTION__));
 
@@ -3510,11 +3510,11 @@ static sm_rcs_t
 fsmdef_ev_addcandidate(sm_event_t *event) {
     fsm_fcb_t           *fcb = (fsm_fcb_t *) event->data;
     fsmdef_dcb_t        *dcb = fcb->dcb;
-    cc_causes_t         cause = CC_CAUSE_NORMAL;
+       //    cc_causes_t         cause = CC_CAUSE_NORMAL;
     cc_feature_t        *msg = (cc_feature_t *) event->msg;
     int                 sdpmode = 0;
     short               vcm_res;
-    uint16_t            level;
+       //    uint16_t            level;
 
 
     FSM_DEBUG_SM(DEB_F_PREFIX"Entered.\n", DEB_F_PREFIX_ARGS(FSM, __FUNCTION__));
@@ -7191,15 +7191,16 @@ fsmdef_show_cmd (cc_int32_t argc, const char *argv[])
     unsigned long strtoul_result;
     char *strtoul_end;
 
+       PR_ASSERT( i == 0 );
     /*
      * Check if need help.
      */
     if ((argc == 2) && (argv[1][0] == '?')) {
-        debugif_printf("show fsmdef [all|rel]\n");
+        debugif_printf("%s", "show fsmdef [all|rel]\n");
     } else if ((argc == 1) || (strcmp(argv[1], "all") == 0)) {
-        debugif_printf("\n-------- FSMDEF dcbs --------");
-        debugif_printf("\ni   call_id  dcb         line");
-        debugif_printf("\n-----------------------------\n");
+        debugif_printf("%s", "\n-------- FSMDEF dcbs --------");
+        debugif_printf("%s", "\ni   call_id  dcb         line");
+        debugif_printf("%s", "\n-----------------------------\n");
 
         /*
          * Print info for all dcbs.
index d0d387fd299fb101d2d92c4c36d64f09fb7cc4ec..a6b022cdce9dfd67ef0460c4f5b1d1ad75d5dac1 100755 (executable)
@@ -2924,17 +2924,18 @@ fsmxfr_show_cmd (cc_int32_t argc, const char *argv[])
     fsmxfr_xcb_t   *xcb;
     int             i = 0;
 
+       PR_ASSERT( i == 0 );
     /*
      * Check if need help.
      */
     if ((argc == 2) && (argv[1][0] == '?')) {
-        debugif_printf("show fsmxfr\n");
+        debugif_printf("%s", "show fsmxfr\n");
         return (0);
     }
 
-    debugif_printf("\n------------------------ FSMXFR xcbs -------------------------");
-    debugif_printf("\ni   xfr_id  xcb         type  method  xfr_call_id  cns_call_id");
-    debugif_printf("\n--------------------------------------------------------------\n");
+    debugif_printf("%s", "\n------------------------ FSMXFR xcbs -------------------------");
+    debugif_printf("%s", "\ni   xfr_id  xcb         type  method  xfr_call_id  cns_call_id");
+    debugif_printf("%s", "\n--------------------------------------------------------------\n");
 
     FSM_FOR_ALL_CBS(xcb, fsmxfr_xcbs, FSMXFR_MAX_XCBS) {
         debugif_printf("%-2d  %-6d  0x%8p  %-4d  %-6d  %-11d  %-11d\n",
index 561aefb796788618bf56fe8c39c3301ae1063f3d..fdf9e83f399123344a22191b177c39ce945660ea 100755 (executable)
@@ -208,7 +208,7 @@ gsm_process_timer_expiration (void *msg)
         break;
     case GSM_FLASH_ONCE_TIMER:
         if (media_timer_callback != NULL) {
-            (* ((media_timer_callback_fp)(media_timer_callback)))();
+            (* ((media_timer_callback)))();
         }
         break;
        case GSM_TONE_DURATION_TIMER:
index e349a347ae2a73df2d9f6905bcb26f50864f7172..2f18f474b27f775fa45e5f64ed712e5e8ba6b444 100644 (file)
@@ -213,7 +213,7 @@ void gsmsdp_process_cap_constraints(fsmdef_dcb_t *dcb,
  */
 void gsmsdp_copy_payloads_to_previous_sdp (fsmdef_media_t *media)
 {
-    static const char *fname = "gsmsdp_copy_payloads_to_previous_sdp";
+       //    static const char *fname = "gsmsdp_copy_payloads_to_previous_sdp";
 
     if ((!media->payloads) && (NULL != media->previous_sdp.payloads))
     {
@@ -2752,7 +2752,7 @@ gsmsdp_negotiate_codec (fsmdef_dcb_t *dcb_p, cc_sdp_t *sdp_p,
     uint16_t        level;
     boolean         explicit_reject = FALSE;
     boolean         found_codec = FALSE;
-    int32_t         num_match_payloads = 0;
+       //    int32_t         num_match_payloads = 0;
     int             codec = RTP_NONE;
     int             remote_pt = RTP_NONE;
     int32_t         payload_types_count = 0; /* count for allocating right amout
@@ -3241,7 +3241,7 @@ static void
 gsmsdp_negotiate_datachannel_attribs(fsmdef_dcb_t* dcb_p, cc_sdp_t* sdp_p, uint16_t level, fsmdef_media_t* media)
 {
     uint32          num_streams;
-    char           *protocol;
+       //    char           *protocol;
 
     sdp_attr_get_fmtp_streams (sdp_p->dest_sdp, level, 0, 1, &num_streams);
 
@@ -3283,7 +3283,7 @@ gsmsdp_add_unsupported_stream_to_local_sdp (cc_sdp_t *sdp_p,
     static const char fname[] = "gsmsdp_add_unsupported_stream_to_local_sdp";
     uint32_t          remote_pt;
     sdp_payload_ind_e remote_pt_indicator;
-    cpr_ip_addr_t     addr;
+       //    cpr_ip_addr_t     addr;
 
     if (sdp_p == NULL) {
         GSM_ERR_MSG(GSM_F_PREFIX"sdp is null.\n", fname);
@@ -4224,10 +4224,10 @@ gsmsdp_negotiate_media_lines (fsm_fcb_t *fcb_p, cc_sdp_t *sdp_p, boolean initial
     fsmdef_media_t *media;
     uint8_t         cap_index;
     sdp_direction_e remote_direction;
-    boolean         result;
+       //    boolean         result;
     int             sdpmode = 0;
-    char           *session_pwd;
-    cc_action_data_t  data;
+       //    char           *session_pwd;
+       //    cc_action_data_t  data;
     int             j=0;
     int             rtcpmux = 0;
     tinybool        rtcp_mux = FALSE;
@@ -4681,7 +4681,7 @@ gsmsdp_get_offered_media_types (fsm_fcb_t *fcb_p, cc_sdp_t *sdp_p, boolean *has_
     uint16_t        i = 0;
     sdp_media_e     media_type;
     fsmdef_dcb_t   *dcb_p = fcb_p->dcb;
-    boolean         result;
+       //    boolean         result;
 
     num_m_lines = sdp_get_num_media_lines(sdp_p->dest_sdp);
     if (num_m_lines == 0) {
@@ -6270,7 +6270,7 @@ gsmsdp_install_peer_ice_attributes(fsm_fcb_t *fcb_p)
     fsmdef_dcb_t    *dcb_p = fcb_p->dcb;
     cc_sdp_t        *sdp_p = dcb_p->sdp;
     fsmdef_media_t  *media;
-    int             level;
+       //    int             level;
     short           result;
 
     /* Tolerate missing ufrag/pwd here at the session level
@@ -6354,12 +6354,12 @@ gsmsdp_configure_dtls_data_attributes(fsm_fcb_t *fcb_p)
     char            *session_fingerprint = NULL;
     sdp_result_e    sdp_res;
     sdp_result_e    sdp_session_res;
-    short           vcm_res;
+       //    short           vcm_res;
     fsmdef_dcb_t    *dcb_p = fcb_p->dcb;
     cc_sdp_t        *sdp_p = dcb_p->sdp;
     fsmdef_media_t  *media;
-    int             level = SDP_SESSION_LEVEL;
-    short           result;
+       //    int             level = SDP_SESSION_LEVEL;
+       //    short           result;
     char           *token;
     char            line_to_split[FSMDEF_MAX_DIGEST_ALG_LEN + FSMDEF_MAX_DIGEST_LEN + 2];
     char           *delim = " ";
index 7ab7c795593056881de281a30b169d1dd0810b3d..93e8d32e05be98cf319b7b7200eaaeb3f41180a9 100644 (file)
@@ -401,7 +401,7 @@ gsmdsp_cmp_key (vcm_crypto_key_t *key1, vcm_crypto_key_t *key2)
 static boolean
 gsmsdp_is_supported_session_parm (const char *session_parms)
 {
-    int         len, wsh;
+    int         len;
     const char *parm_ptr;
     long strtol_result;
     char *strtol_end;
index 5f234c085bb66facaf57fc154d91c97f53a68ef3..f55e04b1c62f647d977db3a5275a712f7f3bdb3b 100755 (executable)
@@ -4939,6 +4939,7 @@ lsm_show_cmd (cc_int32_t argc, const char *arv[])
     int             i = 0;
     lsm_lcb_t      *lcb;
 
+       PR_ASSERT( i == 0 );
     debugif_printf("\n------------------ LSM lcbs -------------------");
     debugif_printf("\ni   call_id  line  state             lcb");
     debugif_printf("\n-----------------------------------------------\n");
index c21592528ca9fc0decccfcd933cffe0b21ebcbbe..ea02257556a072781d2fd32754b55e5eb6ca644b 100644 (file)
@@ -37,6 +37,7 @@ void CSFLogV( CSFLogLevel priority, const char* sourceFile, int sourceLine, cons
 #else
 #endif
 #define CSFLog(pri, file, line, tag, format, ...)
+#define CSFLogV(pri, file, line, tag, format, args)
 #ifdef __cplusplus
 }
 #endif
index 9dc31b9630e89e5d0591508511c9546463504f18..bd149742dd722453fded5a7822a4a2927b6436cd 100755 (executable)
@@ -182,7 +182,6 @@ static const int gSpeakerEnabled = 1;
 static const char gExternalNumberMask[] = "";
 static const char gVersion[] = "0.1";
 static const boolean gRTCPMUX = FALSE;
-static boolean gRTPSAVPF = TRUE;           /* TRUE = RTP/SAVPF , FALSE = RTP/SAVP */
 static const boolean gMAXAVBITRATE = FALSE;      /* Following six are OPUS fmtp options */
 static const boolean gMAXCODEDAUDIOBW = FALSE;
 static const boolean gUSEDTX = FALSE;
index b9197c8eb195ef7d8830bb0796631ca86e023aeb..19fd5e237bbaf52821ebf9fbff9dbe305f866da5 100644 (file)
@@ -9,6 +9,7 @@
 #include "plat_api.h"
 #include "phone_debug.h"
 #include "CSFLog.h"
+#include <assert.h>
 
 typedef cc_int32_t (*debug_callback)(cc_int32_t argc, const char *argv[]);
 typedef cc_int32_t (*show_callback)(cc_int32_t argc, const char *argv[]);
@@ -102,6 +103,6 @@ testevent_t TESTGetEvent(void);
 
 // Send debug output to CSFLog
 #define debugif_printf(format, ...) CSFLogDebug("debugif", format, ## __VA_ARGS__ )
-
+#define PR_ASSERT( test ) assert( test )
 
 #endif /* _DEBUG_INCLUDED_H */
index dac9069407f1f3d1c18287dd618fd0a55644fab4..76251a51f2d9fa87725f05acefa48e9e8faac994 100644 (file)
@@ -9,7 +9,7 @@
 #include "rtp_defs.h"
 #include "CSFLog.h"
 
-static const char* logTag = "sdp_access";
+//static const char* logTag = "sdp_access";
 
 /* Function:    sdp_find_media_level
  * Description: Find and return a pointer to the specified media level,
index b0105ee59d8b955970c90fc9b67f73c5df3d2fec..6d794a2427d33320c54c758f48217d8e01686d5c 100644 (file)
@@ -13,7 +13,7 @@
 //#include "mozilla/Assertions.h"
 #include "CSFLog.h"
 
-static const char* logTag = "sdp_attr";
+//static const char* logTag = "sdp_attr";
 
 /*
  * Macro for sdp_build_attr_fmtp
index 13994455a0ea62d754d3387235c2fd4394ade94f..cda2e6b0517077ddc6583a54289ead50a4ad92c4 100644 (file)
@@ -7,7 +7,7 @@
 #include "sdp_private.h"
 #include "CSFLog.h"
 
-static const char* logTag = "sdp_attr_access";
+//static const char* logTag = "sdp_attr_access";
 
 /* Attribute access routines are all defined by the following parameters.
  *
index 964fe868f2f4cb44a711c353c8ea7d06bed6281f..f8647a4dddcbdb50320822d0fd7a9cf7c1e426d2 100644 (file)
@@ -7,7 +7,7 @@
 #include "sdp_private.h"
 #include "CSFLog.h"
 
-static const char* logTag = "sdp_config";
+//static const char* logTag = "sdp_config";
 
 /* Function:    sdp_verify_conf_ptr
  * Description: Verify the configuration pointer is valid by checking for
index c11c7c89d54b6017fe90e00ddbb4de6dbe23fa81..f63857a7d7dc62f102aa7c944a37b36e0887c5c9 100644 (file)
@@ -7,7 +7,7 @@
 #include "sdp_private.h"
 #include "CSFLog.h"
 
-static const char* logTag = "sdp_main";
+//static const char* logTag = "sdp_main";
 
 /* Note: These *must* be in the same order as the enum types. */
 const sdp_tokenarray_t sdp_token[SDP_MAX_TOKENS] =
index 0856deee1ed4126767c2eba485beb49e9e23e7a0..89e3df66df437c2a14998b60a0485a13c81947bc 100644 (file)
@@ -12,7 +12,7 @@
 #include "ccapi.h"
 #include "CSFLog.h"
 
-static const char *logTag = "sdp_token";
+//static const char *logTag = "sdp_token";
 
 #define MCAST_STRING_LEN 4
 
index f3685e89c6e87917e359f4deacd3bd9f1afecfc5..b9e534fbfa30c92bb7efb0751435e87fa5155be8 100644 (file)
@@ -11,7 +11,7 @@
 
 #define MKI_BUF_LEN 4
 
-static const char* logTag = "sdp_utils";
+//static const char* logTag = "sdp_utils";
 
 sdp_mca_t *sdp_alloc_mca () {
     sdp_mca_t           *mca_p;
index e298993c0975d688fdd0abf417a5560a8b73d315..399de6a9931c2932c680f1c417631bd6f35ef341 100644 (file)
@@ -418,7 +418,7 @@ parseUrlParams (char *url_param, sipUrl_t *sipUrl, genUrl_t *genUrl)
     char *param_val;
     char *url_other_param = NULL;
     uint16_t i;
-    uint32_t ttl_val;
+       //    uint32_t ttl_val;
     unsigned long strtoul_result;
     char *strtoul_end;
 
@@ -4496,7 +4496,7 @@ sippmh_parse_message_summary(sipMessage_t *pSipMessage, sipMessageSummary_t *mes
 
             if (token_found) {
                 errno = 0;
-                strtol_result = (temp, &strtol_end, 10);
+                strtol_result = strtol(temp, &strtol_end, 10);
 
                 if (errno || temp == strtol_end || strtol_result > INT_MAX) {
                     return SIP_ERROR;
index b0c951499f296c973f7b1484cd689d1f9af59664..763978c3e3afb69ee4984fd33bc0eb9d9f7e97df 100644 (file)
@@ -325,7 +325,7 @@ char *
 sipsdp_write_to_buf (cc_sdp_t *sdp_info, uint32_t *retbytes)
 {
     flex_string fs;
-    uint32_t sdp_len;
+       //    uint32_t sdp_len;
     sdp_result_e rc;
 
     flex_string_init(&fs);
index 4330175c67efd4c4be8fcdbd7e28b2998832502b..e24ba40852b267388b2d037df654379b81a6e7f3 100644 (file)
@@ -10,6 +10,7 @@
 #include "cpr_stdlib.h"
 #include "cpr_string.h"
 #include "cpr_strings.h"
+#include "debug.h"
 
 /**
  * sstrncpy
@@ -142,7 +143,7 @@ void flex_string_check_alloc(flex_string *fs, size_t new_min_length) {
 
     /* Sanity check on allocation size */
     if (new_min_length > FLEX_STRING_MAX_SIZE) {
-      MOZ_CRASH();
+               abort();
     }
 
     /* Alloc to nearest chunk */
@@ -193,7 +194,7 @@ void flex_string_sprintf(flex_string *fs, const char *format, ...) {
     /* Try again with new buffer */
     va_start(ap, format);
     vsnprintf_result = vsnprintf(fs->buffer + fs->string_length, fs->buffer_length - fs->string_length, format, ap);
-    MOZ_ASSERT(vsnprintf_result > 0 && vsnprintf_result < (fs->buffer_length - fs->string_length));
+    PR_ASSERT(vsnprintf_result > 0 && vsnprintf_result < (fs->buffer_length - fs->string_length));
     va_end(ap);
   }
 
index a7c47e192a08f37b35a0a2ff0336e9e09a2c381f..7d3d764e620a4f02084c3af12d35ab2dd494c30b 100644 (file)
@@ -180,6 +180,8 @@ cprCreateMessageQueue (const char *name, uint16_t depth)
     static const char fname[] = "cprCreateMessageQueue";
     cpr_msg_queue_t *msgq;
     static int key_id = 100; /* arbitrary starting number */
+       pthread_cond_t _cond = PTHREAD_COND_INITIALIZER;
+       pthread_mutex_t _lock = PTHREAD_MUTEX_INITIALIZER;
 
     msgq = cpr_calloc(1, sizeof(cpr_msg_queue_t));
     if (msgq == NULL) {
@@ -192,9 +194,7 @@ cprCreateMessageQueue (const char *name, uint16_t depth)
     msgq->name = name ? name : unnamed_string;
        msgq->queueId = key_id++;
 
-       pthread_cond_t _cond = PTHREAD_COND_INITIALIZER;
        msgq->cond = _cond;
-       pthread_mutex_t _lock = PTHREAD_MUTEX_INITIALIZER;
        msgq->mutex = _lock;
 
     /*
index 1f47907ea0b574b5abf0367ba6a1e7f042ebba8e..ebc1a0f3716e9671e96a0370f695333bf8348a0e 100644 (file)
@@ -129,6 +129,7 @@ cprConnect (cpr_socket_t soc,
             cpr_socklen_t addr_len)
 {
     int retry = 0, retval;
+    cpr_status_e returnValue = CPR_FAILURE;
 
     cprAssert(addr != NULL, CPR_FAILURE);
 
@@ -140,7 +141,6 @@ cprConnect (cpr_socket_t soc,
       retval = connect(soc, (struct sockaddr *)addr, addr_len);
     }
 
-    cpr_status_e returnValue = CPR_FAILURE;
     if ( retval == 0 || (retval == -1 && errno == EISCONN))
     {
         returnValue =  CPR_SUCCESS;