A problem arose when testing the AMI subscription listing actions where it
was possible for a subscription that had not been fully initialized to be
listed. This was problematic as the underlying listing code would crash.
This change makes it so the subscription tree is fully set up before it is
added to the list of subscriptions. This ensures that when the listing actions
get the subscription it is valid.
ASTERISK-25738 #close
Change-Id: Iace2b13641c31bbcc0d43a39f99aba1f340c0f48
(cherry picked from commit
1c4f2a920db173412b38aab785ba22c2cc489f89)
sub_tree->endpoint = ao2_bump(endpoint);
sub_tree->notify_sched_id = -1;
- add_subscription(sub_tree);
return sub_tree;
}
sub_tree->is_list = 1;
}
+ add_subscription(sub_tree);
+
return sub_tree;
}
return NULL;
}
+ add_subscription(sub_tree);
+
return sub;
}