[prev in list] [next in list] [prev in thread] [next in thread] 

List:       helix-common-dev
Subject:    [Common-dev] CR: Changed common registry to work w/o context with
From:       "Sujeet Kharkar" <skharkar () real ! com>
Date:       2009-02-18 4:25:48
Message-ID: 006a01c99180$f9e42650$9b24fea9 () sujeetlaptop
[Download RAW message or body]

Synopsis
============
Fix crash in rembrdcst.
Suggested Reviewer: Eric Hyche.

Branches
=========
Head

Description
==============
Rembrdcst library uses it's own context, if no context is passed to it. 

Producer is not passing context to rembrcst, in which case internal context
loaded by rembrdcst which uses registry, which requires that context is
available if HELIX_FEATURE_CLIENT is defined. 
Since Producer now has HELIX_FEATURE_CLIENT defined, this causes a crash.

Possible Fixes:
A> Use media platform as context and remove context from statically linking
to rembrdcst.(At least ifdef it.) 
This will also involve adding support for IID_IHXSapManager and
IID_IHXErrorMessages to media platform. 

Estimate: 2 days.

B>
Also check if new defined HELIX_NOT_USING_COMMON_CONTEXT is set, which will
be set by producer.

Due to less time I will log a bug to do A> and have implemented B for now.

Files affected
==================
/cvsroot/common/util/commreg.cpp
/cvsroot/common/util/asmrulep.cpp

Testing
=================
Verified that rembrdcst does not crash.

QA Hints
=============
Test various modes of rembrote broadcast.

Diff
=========

Index: commreg.cpp
===================================================================
RCS file: /cvsroot/common/util/commreg.cpp,v
retrieving revision 1.20
diff -u -r1.20 commreg.cpp
--- commreg.cpp	6 Jul 2007 20:39:16 -0000	1.20
+++ commreg.cpp	18 Feb 2009 03:55:24 -0000
@@ -2085,7 +2085,7 @@
 		return CreateAndSetBufferCCF(prop_name,
(UCHAR*)p->get_key_str(),
 					     p->get_key_str_len(),
m_pContext);
 	    }
-#ifndef HELIX_FEATURE_CLIENT
+#if !defined(HELIX_FEATURE_CLIENT) ||
defined(HELIX_NOT_USING_COMMON_CONTEXT)
 	    prop_name = new CHXBuffer;
 	    prop_name->Set((const unsigned char *)p->get_key_str(), 
 			   p->get_key_str_len());
@@ -2318,7 +2318,7 @@
 	CreateValuesCCF(pValues, m_pContext);
     }
     // Client should always provide m_pContext
-#ifndef HELIX_FEATURE_CLIENT
+#if !defined(HELIX_FEATURE_CLIENT) ||
defined(HELIX_NOT_USING_COMMON_CONTEXT)
     else
     {
 	pValues = new CHXHeader;

Index: asmrulep.cpp
===================================================================
RCS file: /cvsroot/common/util/asmrulep.cpp,v
retrieving revision 1.27
diff -u -r1.27 asmrulep.cpp
--- asmrulep.cpp	6 May 2008 18:45:27 -0000	1.27
+++ asmrulep.cpp	18 Feb 2009 03:55:24 -0000
@@ -1584,7 +1584,7 @@
 				return HXR_OUTOFMEMORY;
 			    }
 			}
-#ifndef HELIX_FEATURE_CLIENT
+#if !defined(HELIX_FEATURE_CLIENT) ||
defined(HELIX_NOT_USING_COMMON_CONTEXT)
 			// Client should always provide m_pContext
 			else
 			{
Index: commreg.cpp


_______________________________________________
Common-dev mailing list
Common-dev@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/common-dev
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic