Bug 822197 Handle creation of more PeerConnections than MAX_LINES r=jesup

This commit is contained in:
Ethan Hugg 2013-01-15 13:11:47 -08:00
parent 46d1a99bf9
commit 06f0419978
3 changed files with 10 additions and 16 deletions

View File

@ -30,6 +30,7 @@ extern sm_rcs_t dcsm_process_event(void *event, int event_id);
static fim_scb_t *fim_scbs;
static fim_icb_t *fim_icbs;
static const char* logTag = "fim.c";
static void
fim_mwi (cc_mwi_t *msg)
@ -204,6 +205,11 @@ fim_get_new_call_chn (callid_t call_id)
if (icb->scb->get_cb) {
icb->scb->get_cb(icb, call_id);
if (!icb->cb) {
CSFLogError(logTag, "%s - unable to get control block for call %d", __FUNCTION__, call_id);
fim_free_call_chn(call_chn, 0, FALSE);
return NULL;
}
icb->call_id = call_id;
icb->ui_locked = FALSE;
}

View File

@ -190,21 +190,9 @@
#define PHONE_MODEL "CP-9971"
#define CCSIP_SIP_USER_AGENT "CP9971"
#define MAX_PHONE_LINES 8
#define MAX_REG_LINES 51
#define MAX_CALLS 51
#define MAX_CALLS_PER_LINE 51
/*
* MAX_INSTANCES (call_instances) should equal to maximum number of calls
* allowed by the phone but MAX_CALLS is defined to be 1 more than the
* actual maximum capacity. Therefore define MAX_INSTANCES to MAX_CALLS -1
*/
#define MAX_INSTANCES (MAX_CALLS - 1) /* max number of instance ID */
/* MAX_CONFIG_LINES - java side defined fixed number to 36 for non-Buckfast TNP
* models so use 36 in call cases. Changing this needs java side change
*/
#define MAX_CONFIG_LINES 51
#define MAX_REG_LINES MAX_CALLS
#define MAX_CALLS_PER_LINE MAX_CALLS
#define MAX_CONFIG_LINES MAX_CALLS
#endif

View File

@ -226,7 +226,7 @@ parse_call_info_parm (char *parm_p, cc_call_info_data_t * feature_data_p)
errno = 0;
strtoul_result = strtoul(temp_p, &strtoul_end, 10);
if (errno || temp_p == strtoul_end || strtoul_result > MAX_INSTANCES) {
if (errno || temp_p == strtoul_end || strtoul_result > (MAX_CALLS - 1)) {
/*
* Call instance ID should not exceed max instances
* or calls.