Skip to content

Commit e13fd37

Browse files
RDK-53913: Fixed the crash while registerApps in XCast OutOfProcess
Signed-off-by: yuvaramachandran_gurusamy <[email protected]>
1 parent be12f02 commit e13fd37

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

XCast/XCastManager.cpp

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,7 @@ bool XCastManager::initialize(const std::string& gdial_interface_name, bool netw
289289

290290
void XCastManager::deinitialize()
291291
{
292+
LOGINFO("Destroying gdialService instance");
292293
lock_guard<recursive_mutex> lock(m_mutexSync);
293294
if (nullptr != gdialCastObj)
294295
{
@@ -422,7 +423,7 @@ bool XCastManager::envGetValue(const char *key, std::string &value)
422423
int XCastManager::applicationStateChanged( string app, string state, string id, string error)
423424
{
424425
int status = 0;
425-
LOGINFO("XcastService::ApplicationStateChanged ARGS = %s : %s : %s : %s ", app.c_str(), id.c_str() , state.c_str() , error.c_str());
426+
LOGINFO("ARGS = %s : %s : %s : %s ", app.c_str(), id.c_str() , state.c_str() , error.c_str());
426427
lock_guard<recursive_mutex> lock(m_mutexSync);
427428
if (gdialCastObj != NULL)
428429
{
@@ -436,7 +437,7 @@ int XCastManager::applicationStateChanged( string app, string state, string id,
436437

437438
void XCastManager::enableCastService(string friendlyname,bool enableService)
438439
{
439-
LOGINFO("XcastService::enableCastService ARGS = %s : %d ", friendlyname.c_str(), enableService);
440+
LOGINFO("ARGS = %s : %d ", friendlyname.c_str(), enableService);
440441
lock_guard<recursive_mutex> lock(m_mutexSync);
441442
if(gdialCastObj != NULL)
442443
{
@@ -450,12 +451,12 @@ void XCastManager::enableCastService(string friendlyname,bool enableService)
450451

451452
void XCastManager::updateFriendlyName(string friendlyname)
452453
{
453-
LOGINFO("XcastService::updateFriendlyName ARGS = %s ", friendlyname.c_str());
454+
LOGINFO("ARGS = %s ", friendlyname.c_str());
454455
lock_guard<recursive_mutex> lock(m_mutexSync);
455456
if(gdialCastObj != NULL)
456457
{
457458
gdialCastObj->FriendlyNameChanged( friendlyname);
458-
LOGINFO("XcastService send onFriendlyNameChanged");
459+
LOGINFO("XcastService send FriendlyNameChanged");
459460
}
460461
else
461462
LOGINFO(" gdialCastObj is NULL ");
@@ -507,11 +508,9 @@ void XCastManager::registerApplications(std::vector<DynamicAppConfig*>& appConfi
507508
LOGINFO(" gdialCastObj is NULL ");
508509
if (nullptr != appReqList)
509510
{
510-
for (RegisterAppEntry* appEntry : appReqList->getValues())
511-
{
512-
delete appEntry;
513-
}
511+
LOGINFO("[%p] Freeing appConfigList",appReqList);
514512
delete appReqList;
513+
appReqList = nullptr;
515514
}
516515
}
517516
}
@@ -563,4 +562,4 @@ bool XCastManager::IsAppEnabled(char* strAppName)
563562
#endif //RFC_ENABLED
564563

565564
return ret;
566-
}
565+
}

0 commit comments

Comments
 (0)