{
try
{
- if (m_xmlDoc.first_node())
+ bundle = m_xmlDoc.first_node();
+ if (bundle)
{
- for (bundle = m_xmlDoc.first_node()->first_node(BUNDLE_TAG); bundle; bundle =
+ for (bundle = bundle->first_node(BUNDLE_TAG); bundle; bundle =
bundle->next_sibling())
{
std::map< std::string, std::string > bundleMap;
std::map< std::string, std::string > bundleConfigMap;
// <bundle>
- if (m_xmlDoc.first_node())
+ bundle = m_xmlDoc.first_node();
+ if (bundle)
{
- for (bundle = m_xmlDoc.first_node()->first_node(BUNDLE_TAG); bundle; bundle =
+ for (bundle = bundle->first_node(BUNDLE_TAG); bundle; bundle =
bundle->next_sibling())
{
// <id>
try
{
// <bundle>
- if (m_xmlDoc.first_node())
+ bundle = m_xmlDoc.first_node();
+ if (bundle)
{
- for (bundle = m_xmlDoc.first_node()->first_node(BUNDLE_TAG); bundle;
+ for (bundle = bundle->first_node(BUNDLE_TAG); bundle;
bundle = bundle->next_sibling())
{
// <id>
{
OIC_LOG_V(INFO, CONTAINER_TAG, "Inspecting");
// <resourceInfo>
- if (bundle->first_node(OUTPUT_RESOURCES_TAG)){
- for (resource = bundle->first_node(OUTPUT_RESOURCES_TAG)->
- first_node(OUTPUT_RESOURCE_INFO);
+ bundle = bundle->first_node(OUTPUT_RESOURCES_TAG);
+ if (bundle){
+ for (resource = bundle->first_node(OUTPUT_RESOURCE_INFO);
resource; resource = resource->next_sibling())
{
try
{
// <bundle>
- if (m_xmlDoc.first_node())
+ bundle = m_xmlDoc.first_node();
+ if (bundle)
{
- for (bundle = m_xmlDoc.first_node()->first_node(BUNDLE_TAG); bundle; bundle =
+ for (bundle = bundle->first_node(BUNDLE_TAG); bundle; bundle =
bundle->next_sibling())
{
// <id>
{
OIC_LOG_V(INFO, CONTAINER_TAG, "Inspecting");
// <resourceInfo>
- if (bundle->first_node(OUTPUT_RESOURCES_TAG))
+ bundle = bundle->first_node(OUTPUT_RESOURCES_TAG);
+ if (bundle)
{
- for (resource = bundle->first_node(OUTPUT_RESOURCES_TAG)->
+ for (resource = bundle->
first_node(OUTPUT_RESOURCE_INFO);
resource; resource = resource->next_sibling())
{
options[0].optionString = optionString;
char classpath[1000];
strcpy(classpath, "-Djava.class.path=");
- strcat(classpath, bundleInfo->getPath().c_str());
+ strncat(classpath, bundleInfo->getPath().c_str(), BUNDLE_PATH_MAXLEN);
OIC_LOG(INFO, CONTAINER_TAG,
std::string("Configured classpath: ").append(classpath).c_str());
char libraryPath[1000];
strcpy(libraryPath, "-Djava.library.path=");
- strcat(libraryPath, bundleInfo->getLibraryPath().c_str());
+ strncat(libraryPath, bundleInfo->getLibraryPath().c_str(), BUNDLE_PATH_MAXLEN);
options[2].optionString = libraryPath;
OIC_LOG(INFO, CONTAINER_TAG,