File 7125-snmp-Add-callback-attributes-to-snmpa_notification_d.patch of Package erlang

From 3248e3e81bdc52021f02ac4149c7d6d0b79d361e Mon Sep 17 00:00:00 2001
From: Lukas Larsson <lukas@erlang.org>
Date: Wed, 27 Sep 2023 21:28:54 +0200
Subject: [PATCH 5/5] snmp: Add callback attributes to
 snmpa_notification_delivery_info_receiver

---
 ...pa_notification_delivery_info_receiver.erl | 28 +++++++++++++------
 1 file changed, 20 insertions(+), 8 deletions(-)

diff --git a/lib/snmp/src/agent/snmpa_notification_delivery_info_receiver.erl b/lib/snmp/src/agent/snmpa_notification_delivery_info_receiver.erl
index aca90baf0e..e863d47c6f 100644
--- a/lib/snmp/src/agent/snmpa_notification_delivery_info_receiver.erl
+++ b/lib/snmp/src/agent/snmpa_notification_delivery_info_receiver.erl
@@ -20,17 +20,29 @@
 
 -module(snmpa_notification_delivery_info_receiver).
 
--export([behaviour_info/1]).
 -export([verify/1]).
 
-behaviour_info(callbacks) ->
-    [
-     {delivery_targets, 3},
-     {delivery_info,    4}
-    ];
-behaviour_info(_) ->
-    undefined.
+-type transportDomain() :: snmpa_conf:transportDomain().
+-type transportAddressWithPort() :: snmpa_conf:transportAddressWithPort().
 
 
+-callback delivery_info(Tag, Targets, DeliveryResult, Extra) -> snmp:void() when
+      Tag :: term(),
+      Targets :: [Target],
+      Target ::
+        {transportDomain(),
+         transportAddressWithPort()},
+      DeliveryResult ::
+          no_response | got_response,
+      Extra :: term().
+-callback delivery_targets(Tag, Targets, Extra) -> snmp:void() when
+      Tag :: term(),
+      Targets :: [Target],
+      Target ::
+        {transportDomain(),
+         transportAddressWithPort()},
+      Extra :: term().
+
 verify(Module) ->
     snmp_misc:verify_behaviour(?MODULE, Module).
+
-- 
2.35.3

openSUSE Build Service is sponsored by