Skip to content

Commit

Permalink
Modift uxrOnAgentFound callback.
Browse files Browse the repository at this point in the history
  • Loading branch information
julibert committed May 5, 2020
1 parent e64b66e commit 5cd655b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion examples/Discovery/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#define MAX_AGENTS 10

void on_agent_found(const TransportLocator* locator, void* args)
bool on_agent_found(const TransportLocator* locator, void* args)
{
(void) args;
switch (locator->format)
Expand All @@ -45,6 +45,7 @@ void on_agent_found(const TransportLocator* locator, void* args)
default:
break;
}
return false;
}

int main(int args, char** argv)
Expand Down
2 changes: 1 addition & 1 deletion include/uxr/client/profile/discovery/discovery.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ extern "C"
#include <stdbool.h>
#include <stddef.h>

typedef void (*uxrOnAgentFound) (const TransportLocator* locator, void* args);
typedef bool (*uxrOnAgentFound) (const TransportLocator* locator, void* args);

/**
* @brief Discovers Agents within the network using UDP/IP multicast with address "239.255.0.2" and port 7400.
Expand Down
3 changes: 1 addition & 2 deletions src/c/profile/discovery/discovery.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,7 @@ bool read_info_message(
TransportLocator* transport = &locators->data[i];
if(0 == memcmp(version->data, DDS_XRCE_XRCE_VERSION.data, sizeof(DDS_XRCE_XRCE_VERSION.data)))
{
callback->on_agent(transport, callback->args);
is_succeed = true;
is_succeed = callback->on_agent(transport, callback->args);
}
}
}
Expand Down

0 comments on commit 5cd655b

Please sign in to comment.