]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res_pjsip_pubsub: Add body_type to test_handler for unit tests
authorGeorge Joseph <gjoseph@sangoma.com>
Fri, 15 Sep 2023 16:17:11 +0000 (10:17 -0600)
committerAsterisk Development Team <asteriskteam@digium.com>
Fri, 12 Jan 2024 18:32:12 +0000 (18:32 +0000)
The ast_sip_subscription_handler "test_handler" used for the unit
tests didn't set "body_type" so the NULL value was causing
a SEGV in build_subscription_tree().  It's now set to "".

Resolves: #335
(cherry picked from commit 71d75373f9df6b971ac069abfbf39be42a1caf70)

res/res_pjsip_pubsub.c

index fe1deabfdb85e3cdfb83e58c9e6aebc23093745e..318251213ed9cd37543198d0e5ee9719a366ca98 100644 (file)
@@ -5171,6 +5171,7 @@ struct ast_sip_notifier test_notifier = {
  */
 struct ast_sip_subscription_handler test_handler = {
        .event_name = "test",
+       .body_type = "",
        .notifier = &test_notifier,
 };