Browse code

modules/rls: Edit to cater for changed presence API Presence API has changed - delete_shtable now takes subs_t pointer instead of str to_tag to compare full dialog tag set

Richard Good authored on 29/01/2014 07:03:26
Showing 3 changed files
... ...
@@ -958,7 +958,7 @@ void rls_notify_callback( struct cell *t, int type, struct tmcb_params *ps)
958 958
 			/* delete from cache table */
959 959
 			hash_code= core_hash(&subs.callid, &subs.to_tag , hash_size);
960 960
 
961
-			if(pres_delete_shtable(rls_table,hash_code, subs.to_tag)< 0)
961
+			if(pres_delete_shtable(rls_table,hash_code, &subs)< 0)
962 962
 			{
963 963
 				LM_ERR("record not found in hash table\n");
964 964
 			}
... ...
@@ -119,7 +119,7 @@ extern void rls_destroy_shtable(shtable_t htable, int hash_size);
119 119
 extern int rls_insert_shtable(shtable_t htable,unsigned int hash_code, subs_t* subs);
120 120
 extern subs_t* rls_search_shtable(shtable_t htable,str callid,str to_tag,
121 121
 		str from_tag,unsigned int hash_code);
122
-extern int rls_delete_shtable(shtable_t htable,unsigned int hash_code,str to_tag);
122
+extern int rls_delete_shtable(shtable_t htable,unsigned int hash_code, subs_t* subs);
123 123
 extern int rls_update_shtable(shtable_t htable,unsigned int hash_code, 
124 124
 		subs_t* subs, int type);
125 125
 extern void rls_update_db_subs_timer(db1_con_t *db,db_func_t dbf, shtable_t hash_table,
... ...
@@ -85,7 +85,7 @@ subs_t* rls_search_shtable(shtable_t htable,str callid,str to_tag,
85 85
 
86 86
 /******************************************************************************/
87 87
 
88
-int rls_delete_shtable(shtable_t htable,unsigned int hash_code,str to_tag)
88
+int rls_delete_shtable(shtable_t htable,unsigned int hash_code, subs_t* subs)
89 89
 {
90 90
   LM_ERR( "rls_delete_shtable shouldn't be called in RLS_DB_ONLY mode\n" );
91 91
   return(-1);