mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-11-02 04:53:24 +00:00
osmo-mgw: err-log: include expected domain name
Add the expected domain name, and move the error log to where the expected domain name is compared. Change-Id: I59f40dc9263f686852f103ca904fc0a6702d7c8e
This commit is contained in:
@@ -223,8 +223,10 @@ static int check_domain_name(struct mgcp_config *cfg, const char *mgcp)
|
||||
if (!strcmp(cfg->domain, "*"))
|
||||
return 0;
|
||||
|
||||
if (strcmp(domain_to_check+1, cfg->domain) != 0)
|
||||
if (strcmp(domain_to_check+1, cfg->domain) != 0) {
|
||||
LOGP(DLMGCP, LOGL_ERROR, "Wrong domain name '%s', expecting '%s'\n", mgcp, cfg->domain);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -244,7 +246,6 @@ static struct mgcp_endpoint *find_endpoint(struct mgcp_config *cfg,
|
||||
|
||||
/* Check if the domainname in the request is correct */
|
||||
if (check_domain_name(cfg, mgcp)) {
|
||||
LOGP(DLMGCP, LOGL_ERROR, "Wrong domain name '%s'\n", mgcp);
|
||||
*cause = -500;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user