Skip to content

Commit

Permalink
ims_usrloc_scscf: Fix ref-counting from previous commit...
Browse files Browse the repository at this point in the history
  • Loading branch information
carstenbock committed Jul 4, 2015
1 parent 47e990e commit d37f534
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion modules/ims_usrloc_scscf/impurecord.c
Expand Up @@ -846,8 +846,14 @@ int update_impurecord(struct udomain* _d, str* public_identity, impurecord_t* im
unlock_subscription_slot(subs_ptr->sl);
} else {
//TODO: we may want to do a deep comparison of the subscription and update....
if (compare_subscription(subs_ptr, subscription) != 0)
if (compare_subscription(subs_ptr, subscription) != 0) {
subs_ptr = subscription;
} else {
// Treat it as a new Subscription - it's not the same as the previos one
ref_subscription_unsafe(subs_ptr); //we reference coz we are using it - will be unreferenced later.
add_subscription_unsafe(subs_ptr);
unlock_subscription_slot(subs_ptr->sl);
}
}
lock_subscription(subs_ptr);
subscription_locked = 1;
Expand Down

0 comments on commit d37f534

Please sign in to comment.