Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addGroupClient another logging issue #2008

Closed
willem4ever opened this issue Jan 11, 2021 · 1 comment
Closed

addGroupClient another logging issue #2008

willem4ever opened this issue Jan 11, 2021 · 1 comment
Milestone

Comments

@willem4ever
Copy link

willem4ever commented Jan 11, 2021

int dynsec_groups__add_client(const char *username, const char *groupname, int priority, bool update_config)
.
.
HASH_FIND(hh, group->clientlist, username, strlen(username), clientlist);
	if(clientlist != NULL){
		/* Client is already in the group */
		return MOSQ_ERR_ALREADY_EXISTS;
	}

dynsec_groups__add_client() should return MOSQ_ERR_ALREADY_EXISTS when client is already in the group ... dynsec_groups__process_add_client() needs to deal with MOSQ_ERR_ALREADY_EXISTS ....

else if(rc == MOSQ_ERR_ALREADY_EXISTS) {
       dynsec__command_reply(j_responses, context, "addGroupClient", "Client already member", correlation_data);
}

thanks !

@ralight
Copy link
Contributor

ralight commented Jan 11, 2021

The original intent of having this report as a success was that if the client is already in the group then it doesn't matter. But thinking about it, I think having it report the true situation is better.

@ralight ralight added this to the 2.0.5 milestone Jan 11, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants