summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_notification.c
diff options
context:
space:
mode:
Diffstat (limited to 'bgpd/bgp_notification.c')
-rw-r--r--bgpd/bgp_notification.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/bgpd/bgp_notification.c b/bgpd/bgp_notification.c
index 2343c785..50fe35a9 100644
--- a/bgpd/bgp_notification.c
+++ b/bgpd/bgp_notification.c
@@ -136,6 +136,19 @@ bgp_notify_unset(bgp_notify* p_notification)
} ;
/*------------------------------------------------------------------------------
+ * Unset pointer to notification and free any existing notification structure.
+ *
+ * Does nothing if there is no structure.
+ */
+extern bgp_notify
+bgp_notify_take(bgp_notify* p_notification)
+{
+ bgp_notify take = *p_notification ; /* take anything that's there */
+ *p_notification = NULL ;
+ return take ;
+} ;
+
+/*------------------------------------------------------------------------------
* Set pointer to notification
*
* Frees any existing notification at the destination.