MXS-1929: Output const strings from serviceGetUser

The values aren't meant to be modified by the caller.
This commit is contained in:
Markus Mäkelä
2018-08-02 23:01:44 +03:00
parent 7d6338d65b
commit b20decfe1c
10 changed files with 60 additions and 67 deletions

View File

@ -1008,21 +1008,18 @@ bool serviceHasBackend(Service *service, SERVER *server)
}
/**
* Get the service user that is used to log in to the backebd servers
* Get the service user that is used to log in to the backend servers
* associated with this service.
*
* @param service The service we are setting the data for
* @param user The user name to use for connections
* @param auth The authentication data we need, e.g. MySQL SHA1 password
* @return 0 on failure
*/
int
serviceGetUser(SERVICE *svc, char **user, char **auth)
void serviceGetUser(SERVICE *svc, const char **user, const char **auth)
{
Service* service = static_cast<Service*>(svc);
*user = service->credentials.name;
*auth = service->credentials.authdata;
return 1;
}
/**