From 64a2a740d68d2fc683e276b2f6230fb124e040f1 Mon Sep 17 00:00:00 2001 From: Ethan Hugg Date: Fri, 14 Dec 2012 13:43:06 -0800 Subject: [PATCH] Bug 806829 - Signaling - remove g_deviceInfo.name r=jesup --- .../signaling/src/sipcc/core/ccapp/ccapi_device.c | 5 ----- .../src/sipcc/core/ccapp/ccapi_device_info.c | 12 +++--------- .../signaling/src/sipcc/core/ccapp/ccapi_snapshot.c | 5 ----- .../signaling/src/sipcc/core/ccapp/ccapi_snapshot.h | 1 - 4 files changed, 3 insertions(+), 20 deletions(-) diff --git a/media/webrtc/signaling/src/sipcc/core/ccapp/ccapi_device.c b/media/webrtc/signaling/src/sipcc/core/ccapp/ccapi_device.c index 79a919410f70..0f8007cf4c92 100644 --- a/media/webrtc/signaling/src/sipcc/core/ccapp/ccapi_device.c +++ b/media/webrtc/signaling/src/sipcc/core/ccapp/ccapi_device.c @@ -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); } diff --git a/media/webrtc/signaling/src/sipcc/core/ccapp/ccapi_device_info.c b/media/webrtc/signaling/src/sipcc/core/ccapp/ccapi_device_info.c index c6671915b041..92d6d9e897ae 100644 --- a/media/webrtc/signaling/src/sipcc/core/ccapp/ccapi_device_info.c +++ b/media/webrtc/signaling/src/sipcc/core/ccapp/ccapi_device_info.c @@ -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(); } diff --git a/media/webrtc/signaling/src/sipcc/core/ccapp/ccapi_snapshot.c b/media/webrtc/signaling/src/sipcc/core/ccapp/ccapi_snapshot.c index b2e15b44b07f..11ee155634ad 100644 --- a/media/webrtc/signaling/src/sipcc/core/ccapp/ccapi_snapshot.c +++ b/media/webrtc/signaling/src/sipcc/core/ccapp/ccapi_snapshot.c @@ -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); diff --git a/media/webrtc/signaling/src/sipcc/core/ccapp/ccapi_snapshot.h b/media/webrtc/signaling/src/sipcc/core/ccapp/ccapi_snapshot.h index 087513fea0ac..6720d5384c52 100644 --- a/media/webrtc/signaling/src/sipcc/core/ccapp/ccapi_snapshot.h +++ b/media/webrtc/signaling/src/sipcc/core/ccapp/ccapi_snapshot.h @@ -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;