Ver Fonte

- fix presence crash when event->apply_auth_nbody is not defined (patch by Denis Bilenko, closes #1993606)

git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@4533 689a6050-402a-0410-94f2-e92a70836424
Daniel-Constantin Mierla há 17 anos atrás
pai
commit
87ad6d2c85
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      modules_k/presence/notify.c

+ 2 - 2
modules_k/presence/notify.c

@@ -1347,7 +1347,7 @@ int send_notify_request(subs_t* subs, subs_t * watcher_subs,
 		if( subs->event->req_auth)
 		{
 			
-			if(subs->auth_rules_doc &&
+			if(subs->auth_rules_doc && subs->event->apply_auth_nbody &&
 				subs->event->apply_auth_nbody(n_body, subs, &notify_body)< 0)
 			{
 				LM_ERR("in function apply_auth_nbody\n");
@@ -1390,7 +1390,7 @@ int send_notify_request(subs_t* subs, subs_t * watcher_subs,
 				if(subs->event->req_auth)
 				{
 					 
-					if(subs->auth_rules_doc && 
+					if(subs->auth_rules_doc && subs->event->apply_auth_nbody &&
 					subs->event->apply_auth_nbody(notify_body,subs,&final_body)<0)
 					{
 						LM_ERR("in function apply_auth\n");