Prechádzať zdrojové kódy

- taken changes from modules_k (missing pre_auth enums handled in switch)

root 14 rokov pred
rodič
commit
e0fe362a5c
1 zmenil súbory, kde vykonal 12 pridanie a 0 odobranie
  1. 12 0
      modules_s/auth_db/authorize.c

+ 12 - 0
modules_s/auth_db/authorize.c

@@ -332,6 +332,18 @@ static inline int authenticate(struct sip_msg* msg, str* realm, authdb_table_inf
 	ret = -1;
     
 	switch(auth_api.pre_auth(msg, realm, hftype, &h, NULL)) {
+	case NONCE_REUSED:
+		LM_DBG("nonce reused");
+		ret = AUTH_NONCE_REUSED;
+		goto end;
+	case STALE_NONCE:
+		LM_DBG("stale nonce\n");
+		ret = AUTH_STALE_NONCE;
+		goto end;
+	case NO_CREDENTIALS:
+		LM_DBG("no credentials\n");
+		ret = AUTH_NO_CREDENTIALS;
+		goto end;
 	case ERROR:
 	case BAD_CREDENTIALS:
 		ret = -3;