Просмотр исходного кода

- nonce_count example fixes: save_noreply, t_reply("$code", "$reason") ...

Andrei Pelinescu-Onciul 17 лет назад
Родитель
Сommit
b9014b0b40
2 измененных файлов с 8 добавлено и 4 удалено
  1. 4 2
      modules_s/auth/README
  2. 4 2
      modules_s/auth/doc/params.xml

+ 4 - 2
modules_s/auth/README

@@ -205,16 +205,18 @@ route{
                         }else if ($? == -3){
                         }else if ($? == -3){
                                 t_reply("400", "Bad Request");
                                 t_reply("400", "Bad Request");
                         }else{
                         }else{
-                                if ($disgest_challenge)
+                                if ($digest_challenge)
                                         append_to_reply("%$digest_challenge");
                                         append_to_reply("%$digest_challenge");
                                 t_reply("401", "Unauthorized");
                                 t_reply("401", "Unauthorized");
                         }
                         }
                         drop;
                         drop;
                 }
                 }
-                if (!save_contacts("location")) {
+                if (!save_noreply("location")) {
                         t_reply("400", "Invalid REGISTER Request");
                         t_reply("400", "Invalid REGISTER Request");
                         drop;
                         drop;
                 }
                 }
+                append_to_reply("%$contact");
+                t_reply("$code", "$reason"); # no %, avps are used directly
                 drop;
                 drop;
         }else{
         }else{
                 if (!proxy_authenticate("my_realm", "credentials")){
                 if (!proxy_authenticate("my_realm", "credentials")){

+ 4 - 2
modules_s/auth/doc/params.xml

@@ -209,16 +209,18 @@ route{
 			}else if ($? == -3){
 			}else if ($? == -3){
 				t_reply("400", "Bad Request");
 				t_reply("400", "Bad Request");
 			}else{
 			}else{
-				if ($disgest_challenge) 
+				if ($digest_challenge) 
 					append_to_reply("%$digest_challenge");
 					append_to_reply("%$digest_challenge");
 				t_reply("401", "Unauthorized");
 				t_reply("401", "Unauthorized");
 			}
 			}
 			drop;
 			drop;
 		}
 		}
-		if (!save_contacts("location")) {
+		if (!save_noreply("location")) {
 			t_reply("400", "Invalid REGISTER Request");
 			t_reply("400", "Invalid REGISTER Request");
 			drop;
 			drop;
 		}
 		}
+		append_to_reply("%$contact");
+		t_reply("$code", "$reason"); # no %, avps are used directly 
 		drop;
 		drop;
 	}else{
 	}else{
 		if (!proxy_authenticate("my_realm", "credentials")){
 		if (!proxy_authenticate("my_realm", "credentials")){