Browse code

backport from opensips trunk rev4760 - fixed a bug when sending presence notify on callback for notify for presence.winfo and the reply is error

(was not backported to opensips 1.4)



git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@5118 689a6050-402a-0410-94f2-e92a70836424

Klaus Darilion authored on 23/10/2008 08:04:02
Showing 1 changed files
... ...
@@ -1734,8 +1734,6 @@ void p_tm_callback( struct cell *t, int type, struct tmcb_params *ps)
1734 1734
 		delete_shtable(subs_htable, hash_code, cb->to_tag);
1735 1735
 
1736 1736
 		delete_db_subs(cb->pres_uri, cb->ev_name, cb->to_tag);
1737
-
1738
-		goto done;
1739 1737
 	}	
1740 1738
 	/* send a more accurate Notify for presence depending on the reply for winfo*/
1741 1739
 	if(((c_back_param*)(*ps->param))->wi_subs!= NULL)
... ...
@@ -1744,7 +1742,7 @@ void p_tm_callback( struct cell *t, int type, struct tmcb_params *ps)
1744 1742
 	  * send a Notify for presence with no body (the stored presence information is 
1745 1743
 	  * not valid ) */
1746 1744
 
1747
-		if(ps->code >= 300)
1745
+		if(ps->code >= 408)
1748 1746
 		{
1749 1747
 			if(notify( ((c_back_param*)(*ps->param))->wi_subs, NULL,NULL,1)< 0)
1750 1748
 			{
... ...
@@ -1762,7 +1760,6 @@ void p_tm_callback( struct cell *t, int type, struct tmcb_params *ps)
1762 1760
 	else
1763 1761
 		LM_DBG("Empty wi_subs parameter\n");
1764 1762
 
1765
-done:
1766 1763
 	if(*ps->param !=NULL  )
1767 1764
 		free_cbparam((c_back_param*)(*ps->param));
1768 1765
 	return ;