|
@@ -212,6 +212,8 @@ extern WORKUNIT_API IHpccPackageSet *createPackageSet(const char *process)
|
|
|
|
|
|
extern WORKUNIT_API IPropertyTree * getPackageMapById(const char * id, bool readonly)
|
|
extern WORKUNIT_API IPropertyTree * getPackageMapById(const char * id, bool readonly)
|
|
{
|
|
{
|
|
|
|
+ if (!id || !*id)
|
|
|
|
+ return NULL;
|
|
StringBuffer xpath;
|
|
StringBuffer xpath;
|
|
xpath.append("/PackageMaps/PackageMap[@id=\"").append(id).append("\"]");
|
|
xpath.append("/PackageMaps/PackageMap[@id=\"").append(id).append("\"]");
|
|
Owned<IRemoteConnection> conn = querySDS().connect(xpath.str(), myProcessSession(), readonly ? RTM_LOCK_READ : RTM_LOCK_WRITE, SDS_LOCK_TIMEOUT);
|
|
Owned<IRemoteConnection> conn = querySDS().connect(xpath.str(), myProcessSession(), readonly ? RTM_LOCK_READ : RTM_LOCK_WRITE, SDS_LOCK_TIMEOUT);
|
|
@@ -222,6 +224,8 @@ extern WORKUNIT_API IPropertyTree * getPackageMapById(const char * id, bool read
|
|
|
|
|
|
extern WORKUNIT_API IPropertyTree * getPackageMapById(const char *target, const char * id, bool readonly)
|
|
extern WORKUNIT_API IPropertyTree * getPackageMapById(const char *target, const char * id, bool readonly)
|
|
{
|
|
{
|
|
|
|
+ if (!id || !*id)
|
|
|
|
+ return NULL;
|
|
if (target && *target)
|
|
if (target && *target)
|
|
{
|
|
{
|
|
VStringBuffer xpath("/PackageMaps/PackageMap[@id='%s::%s']", target, id);
|
|
VStringBuffer xpath("/PackageMaps/PackageMap[@id='%s::%s']", target, id);
|