Module: kamailio
Branch: master
Commit: a471e4723206cdce7e9e319af344145b92444698
URL:
https://github.com/kamailio/kamailio/commit/a471e4723206cdce7e9e319af344145…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-11-03T12:55:31+01:00
auth_ephemeral: re-ordered code so access to sip msg is done after NULL check
---
Modified: modules/auth_ephemeral/authorize.c
---
Diff:
https://github.com/kamailio/kamailio/commit/a471e4723206cdce7e9e319af344145…
Patch:
https://github.com/kamailio/kamailio/commit/a471e4723206cdce7e9e319af344145…
---
diff --git a/modules/auth_ephemeral/authorize.c b/modules/auth_ephemeral/authorize.c
index 5725d7f..cae32fb 100644
--- a/modules/auth_ephemeral/authorize.c
+++ b/modules/auth_ephemeral/authorize.c
@@ -334,17 +334,17 @@ int autheph_www2(struct sip_msg *_m, char *_realm, char *_method)
return AUTH_ERROR;
}
- if (_m->REQ_METHOD == METHOD_ACK || _m->REQ_METHOD == METHOD_CANCEL)
- {
- return AUTH_OK;
- }
-
if(_m == NULL || _realm == NULL)
{
LM_ERR("invalid parameters\n");
return AUTH_ERROR;
}
+ if (_m->REQ_METHOD == METHOD_ACK || _m->REQ_METHOD == METHOD_CANCEL)
+ {
+ return AUTH_OK;
+ }
+
if (get_str_fparam(&srealm, _m, (fparam_t*)_realm) < 0)
{
LM_ERR("failed to get realm value\n");