- fix presence crash when event->apply_auth_nbody is not defined (patch by Denis...
authorDaniel-Constantin Mierla <miconda@gmail.com>
Fri, 1 Aug 2008 09:27:40 +0000 (09:27 +0000)
committerDaniel-Constantin Mierla <miconda@gmail.com>
Fri, 1 Aug 2008 09:27:40 +0000 (09:27 +0000)
git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@4533 689a6050-402a-0410-94f2-e92a70836424

modules_k/presence/notify.c

index 93ba63a..ac44919 100644 (file)
@@ -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");