Browse code

modules/ims_usrloc_scscf: only remove impurecord if there are no active subscriptions

jaybeepee authored on 15/07/2015 07:15:40
Showing 1 changed files
... ...
@@ -358,6 +358,7 @@ static inline void process_impurecord(impurecord_t* _r) {
358 358
                 LM_DBG("DBG:registrar_timer: Subscription has dialog record in hash table with presentity uri <%.*s>\n", sub_dialog->pres_uri.len, sub_dialog->pres_uri.s);
359 359
             }
360 360
             lock_release(&sub_dialog_table[sl].lock);
361
+            mustdeleteimpu = 0;
361 362
         }
362 363
         s = s->next;
363 364
     }
... ...
@@ -367,7 +368,6 @@ static inline void process_impurecord(impurecord_t* _r) {
367 367
             _r->barring,
368 368
             get_impu_regstate_as_string(_r->reg_state));
369 369
     flag = 0;
370
-    mustdeleteimpu = 1;
371 370
     hascontacts = 0;
372 371
     num_contacts_to_expire = 0;
373 372
     for (k = 0; (k < _r->num_contacts) && (k < MAX_CONTACTS_PER_IMPU); k++) {