Fix some threads related problems [quagga-dev 591].
diff --git a/isisd/ChangeLog b/isisd/ChangeLog
index 5f4eabe..6142dfd 100644
--- a/isisd/ChangeLog
+++ b/isisd/ChangeLog
@@ -1,3 +1,6 @@
+2003-12-31 Hasso Tepper <hasso@estpak.ee>
+  * isis_dr.c: Fix some threads related bugs.
+
 2003-12-23 Hasso Tepper <hasso@estpak.ee>
   Some fixes done by me and Cougar <cougar@random.ee>.
   * isis_adjacency.c: Two bugfixes by Cougar:
diff --git a/isisd/isis_dr.c b/isisd/isis_dr.c
index 5b7d23e..f2fcb39 100644
--- a/isisd/isis_dr.c
+++ b/isisd/isis_dr.c
@@ -80,6 +80,7 @@
   if (circuit->u.bc.run_dr_elect[0])
     zlog_warn ("isis_run_dr(): run_dr_elect already set for l1");
   
+  circuit->u.bc.t_run_dr[0] = NULL;
   circuit->u.bc.run_dr_elect[0] = 1;
     
   return ISIS_OK;
@@ -97,6 +98,7 @@
     zlog_warn ("isis_run_dr(): run_dr_elect already set for l2");
   
   
+  circuit->u.bc.t_run_dr[1] = NULL; 
   circuit->u.bc.run_dr_elect[1] = 1;
     
   return ISIS_OK;
@@ -273,8 +275,8 @@
   } else {
     memset (circuit->u.bc.l2_desig_is, 0, ISIS_SYS_ID_LEN + 1);
 
-    if (circuit->t_send_csnp[0])
-      thread_cancel (circuit->t_send_csnp[0]);
+    if (circuit->t_send_csnp[1])
+      thread_cancel (circuit->t_send_csnp[1]);
 
     circuit->u.bc.t_run_dr[1] =
       thread_add_timer (master, isis_run_dr_l2, circuit,