Skip to content

Commit

Permalink
[FIXED] GH-786, do not prefix endpoint name with the group prefix (#741)
Browse files Browse the repository at this point in the history
  • Loading branch information
levb authored Apr 5, 2024
1 parent ff8528f commit a03aed8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/micro.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ micro_add_endpoint(microEndpoint **new_ep, microService *m, const char *prefix,

if (m->first_ep != NULL)
{
if (strcmp(m->first_ep->name, ep->name) == 0)
if (strcmp(m->first_ep->subject, ep->subject) == 0)
{
ep->next = m->first_ep->next;
prev_ep = m->first_ep;
Expand All @@ -106,7 +106,7 @@ micro_add_endpoint(microEndpoint **new_ep, microService *m, const char *prefix,
prev_ptr = m->first_ep;
for (ptr = m->first_ep->next; ptr != NULL; prev_ptr = ptr, ptr = ptr->next)
{
if (strcmp(ptr->name, ep->name) == 0)
if (strcmp(ptr->subject, ep->subject) == 0)
{
ep->next = ptr->next;
prev_ptr->next = ep;
Expand Down
2 changes: 1 addition & 1 deletion src/micro_endpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ micro_new_endpoint(microEndpoint **new_ep, microService *m, const char *prefix,

MICRO_CALL(err, micro_ErrorFromStatus(natsMutex_Create(&ep->endpoint_mu)));
MICRO_CALL(err, micro_clone_endpoint_config(&ep->config, cfg));
MICRO_CALL(err, _dup_with_prefix(&ep->name, prefix, cfg->Name));
MICRO_CALL(err, micro_strdup(&ep->name, cfg->Name));
MICRO_CALL(err, _dup_with_prefix(&ep->subject, prefix, subj));
if (err != NULL)
{
Expand Down

0 comments on commit a03aed8

Please sign in to comment.