Skip to content

Commit

Permalink
Merge branch 'main' into rbus-rtthreadpool-mutex-unlock
Browse files Browse the repository at this point in the history
  • Loading branch information
karuna2git authored Nov 19, 2024
2 parents 816c737 + bcd811c commit af0d0e5
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/rbus/rbus_element.c
Original file line number Diff line number Diff line change
Expand Up @@ -392,17 +392,14 @@ elementNode* retrieveElement(elementNode* root, const char* elmentName)
char* saveptr = NULL;
elementNode* currentNode = root;
elementNode* nextNode = NULL;
int tokenFound = 0;

LOCK();
int tokenFound = 0;
RBUSLOG_DEBUG("Request to retrieve element [%s]", elmentName);
if(currentNode == NULL)
{
return NULL;
}

LOCK();
name = strdup(elmentName);

nextNode = currentNode->child;

/*TODO if name is a table row with an alias containing a dot, this will break (e.g. "Foo.[alias.1]")*/
Expand Down Expand Up @@ -496,14 +493,13 @@ elementNode* retrieveInstanceElementEx(rbusHandle_t handle, elementNode* root, c
bool isWildcard = false;

RBUSLOG_DEBUG("Request to retrieve element [%s]", elmentName);
LOCK();

if(currentNode == NULL)
{
return NULL;
}

LOCK();
name = strdup(elmentName);

nextNode = currentNode->child;

/*TODO if name is a table row with an alias containing a dot, this will break (e.g. "Foo.[alias.1]")*/
Expand Down Expand Up @@ -1024,6 +1020,7 @@ elementNode* instantiateTableRow(elementNode* tableNode, uint32_t instNum, char

if(!rowTemplate)
{
UNLOCK();
assert(false);
RBUSLOG_ERROR("ERROR: row template not found for table %s", tableNode->fullName);
return NULL;
Expand Down

0 comments on commit af0d0e5

Please sign in to comment.