Bug 806829 - Signaling - remove g_deviceInfo.name r=jesup

This commit is contained in:
Ethan Hugg 2012-12-14 13:43:06 -08:00
Родитель 236be30d26
Коммит 64a2a740d6
4 изменённых файлов: 3 добавлений и 20 удалений

Просмотреть файл

@ -48,10 +48,6 @@ cc_deviceinfo_ref_t CCAPI_Device_getDeviceInfo(cc_device_handle_t handle)
if (device_info) {
*device_info = g_deviceInfo;
device_info->name = strlib_copy(g_deviceInfo.name);
if (device_info->name == NULL) {
device_info->name = strlib_empty();
}
device_info->not_prompt = strlib_copy(g_deviceInfo.not_prompt);
if (device_info->not_prompt == NULL) {
device_info->not_prompt = strlib_empty();
@ -96,7 +92,6 @@ void CCAPI_Device_releaseDeviceInfo(cc_deviceinfo_ref_t ref){
if (device_info) {
device_info->ref_count--;
if ( device_info->ref_count == 0 ) {
strlib_free(device_info->name);
strlib_free(device_info->not_prompt);
cpr_free(device_info);
}

Просмотреть файл

@ -12,7 +12,9 @@
#include "ccapi_snapshot.h"
#include "ccapi_device_info.h"
#include "util_string.h"
#include "CSFLog.h"
static const char* logTag = "ccapi_device_info";
/**
* gets the device name
@ -32,15 +34,7 @@ cc_deviceinfo_ref_t CCAPI_DeviceInfo_getDeviceHandle ()
*/
cc_string_t CCAPI_DeviceInfo_getDeviceName (cc_deviceinfo_ref_t handle)
{
static const char *fname="CCAPI_DeviceInfo_getDeviceName";
cc_device_info_t *device = handle;
CCAPP_DEBUG(DEB_F_PREFIX"Entering\n", DEB_F_PREFIX_ARGS(SIP_CC_PROV, fname));
if ( device != NULL ) {
CCAPP_DEBUG(DEB_F_PREFIX"returned %s\n", DEB_F_PREFIX_ARGS(SIP_CC_PROV, fname), device->name);
return device->name;
}
CSFLogDebug(logTag, "Call to deprecated function %s, returning empty string", __FUNCTION__);
return strlib_empty();
}

Просмотреть файл

@ -326,9 +326,6 @@ void ccsnap_device_pre_init () {
int i = 0;
CCAPP_DEBUG(DEB_F_PREFIX"Entering device_pre_init to clear it out to avoid mem leaks\n", DEB_F_PREFIX_ARGS(SIP_CC_PROV, "ccsnap_device_pre_init"));
if ((g_deviceInfo.name) && (strlen(g_deviceInfo.name) > 0)) {
strlib_free(g_deviceInfo.name);
}
if ((g_deviceInfo.not_prompt) && (strlen(g_deviceInfo.not_prompt) > 0)) {
strlib_free(g_deviceInfo.not_prompt);
}
@ -350,7 +347,6 @@ void ccsnap_device_init() {
ccsnap_device_pre_init();
memset (&g_deviceInfo, 0, sizeof(g_deviceInfo));
g_deviceInfo.name =strlib_empty();
g_deviceInfo.not_prompt =strlib_empty();
g_deviceInfo.not_prompt_prio = 0;
@ -402,7 +398,6 @@ void ccsnap_gen_deviceEvent(ccapi_device_event_e event, cc_device_handle_t handl
CCAPP_DEBUG(DEB_F_PREFIX"setting property %s to %s\n", DEB_F_PREFIX_ARGS(SIP_CC_PROV, fname), "FullyRegistered", ((device_info->ins_state == CC_STATE_INS) ? "1" : "0"));
//intentional follow through to let the debugs get printed.
default:
CCAPP_DEBUG(DEB_F_PREFIX"data->name=%s \n", DEB_F_PREFIX_ARGS(SIP_CC_PROV, fname), device_info->name);
CCAPP_DEBUG(DEB_F_PREFIX"data->mwi_lamp=%d \n", DEB_F_PREFIX_ARGS(SIP_CC_PROV, fname), device_info->mwi_lamp);
CCAPP_DEBUG(DEB_F_PREFIX"data->ins_state=%02X \n", DEB_F_PREFIX_ARGS(SIP_CC_PROV, fname), device_info->ins_state);
CCAPP_DEBUG(DEB_F_PREFIX"data->cucm_mode=%02X \n", DEB_F_PREFIX_ARGS(SIP_CC_PROV, fname), device_info->cucm_mode);

Просмотреть файл

@ -63,7 +63,6 @@ typedef struct cc_call_server_t_ {
typedef struct cc_device_info_t_ {
cc_uint32_t ref_count;
cc_string_t name;
cc_string_t not_prompt;
char registration_ip_addr[MAX_IPADDR_STR_LEN];
cc_int32_t not_prompt_prio;