summaryrefslogtreecommitdiff
path: root/ospfd/ospf_opaque.c
diff options
context:
space:
mode:
Diffstat (limited to 'ospfd/ospf_opaque.c')
-rw-r--r--ospfd/ospf_opaque.c30
1 files changed, 14 insertions, 16 deletions
diff --git a/ospfd/ospf_opaque.c b/ospfd/ospf_opaque.c
index 56efa2ebd6..fa87434a14 100644
--- a/ospfd/ospf_opaque.c
+++ b/ospfd/ospf_opaque.c
@@ -9,16 +9,15 @@
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2, or (at your option) any
* later version.
- *
+ *
* GNU Zebra is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with GNU Zebra; see the file COPYING. If not, write to the Free
- * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <zebra.h>
@@ -1342,8 +1341,9 @@ ospf_opaque_lsa_originate_schedule (struct ospf_interface *oi, int *delay0)
{
if (IS_DEBUG_OSPF_EVENT)
zlog_debug ("Schedule Type-9 Opaque-LSA origination in %d ms later.", delay);
- oi->t_opaque_lsa_self =
- thread_add_timer_msec (master, ospf_opaque_type9_lsa_originate, oi, delay);
+ oi->t_opaque_lsa_self = NULL;
+ thread_add_timer_msec(master, ospf_opaque_type9_lsa_originate, oi, delay,
+ &oi->t_opaque_lsa_self);
delay += top->min_ls_interval;
}
@@ -1358,9 +1358,9 @@ ospf_opaque_lsa_originate_schedule (struct ospf_interface *oi, int *delay0)
*/
if (IS_DEBUG_OSPF_EVENT)
zlog_debug ("Schedule Type-10 Opaque-LSA origination in %d ms later.", delay);
- area->t_opaque_lsa_self =
- thread_add_timer_msec (master, ospf_opaque_type10_lsa_originate,
- area, delay);
+ area->t_opaque_lsa_self = NULL;
+ thread_add_timer_msec(master, ospf_opaque_type10_lsa_originate, area, delay,
+ &area->t_opaque_lsa_self);
delay += top->min_ls_interval;
}
@@ -1375,9 +1375,9 @@ ospf_opaque_lsa_originate_schedule (struct ospf_interface *oi, int *delay0)
*/
if (IS_DEBUG_OSPF_EVENT)
zlog_debug ("Schedule Type-11 Opaque-LSA origination in %d ms later.", delay);
- top->t_opaque_lsa_self =
- thread_add_timer_msec (master, ospf_opaque_type11_lsa_originate,
- top, delay);
+ top->t_opaque_lsa_self = NULL;
+ thread_add_timer_msec(master, ospf_opaque_type11_lsa_originate, top, delay,
+ &top->t_opaque_lsa_self);
delay += top->min_ls_interval;
}
@@ -1654,9 +1654,7 @@ ospf_opaque_lsa_refresh (struct ospf_lsa *lsa)
* triggered by external interventions (vty session, signaling, etc).
*------------------------------------------------------------------------*/
-#define OSPF_OPAQUE_TIMER_ON(T,F,L,V) \
- if (!(T)) \
- (T) = thread_add_timer_msec (master, (F), (L), (V))
+#define OSPF_OPAQUE_TIMER_ON(T,F,L,V) thread_add_timer_msec (master, (F), (L), (V), &(T))
static struct ospf_lsa *pseudo_lsa (struct ospf_interface *oi, struct ospf_area *area, u_char lsa_type, u_char opaque_type);
static int ospf_opaque_type9_lsa_reoriginate_timer (struct thread *t);