? ospfd/.libs Index: ospfd/ospf_packet.c =================================================================== RCS file: /var/cvsroot/quagga/ospfd/ospf_packet.c,v retrieving revision 1.28 diff -u -r1.28 ospf_packet.c --- ospfd/ospf_packet.c 20 Jun 2004 21:00:27 -0000 1.28 +++ ospfd/ospf_packet.c 9 Jul 2004 17:39:18 -0000 @@ -3126,6 +3126,9 @@ struct ospf_interface *oi = THREAD_ARG(thread); struct route_node *rn; struct route_node *rnext; + struct list *update; + struct listnode *tn, *nn; + unsigned int again = 0; oi->t_ls_upd_event = NULL; @@ -3134,23 +3137,40 @@ for (rn = route_top (oi->ls_upd_queue); rn; rn = rnext) { - + update = (struct list *)rn->info; rnext = route_next (rn); if (rn->info == NULL) continue; - while (!list_isempty ((list)rn->info)) - ospf_ls_upd_queue_send (oi, rn->info, rn->p.u.prefix4); - - list_delete (rn->info); - rn->info = NULL; + for (tn = update->head; tn; tn = nn) + { + nn = tn->next; + ospf_ls_upd_queue_send (oi, update, rn->p.u.prefix4); + } - route_unlock_node (rn); + if (listcount(update) == 0) + { + list_delete (rn->info); + rn->info = NULL; + route_unlock_node (rn); + } + else + again++; + } + + if (again != 0) + { + if (IS_DEBUG_OSPF_EVENT) + zlog_info ("ospf_ls_upd_send_queue: update lists not cleared," + " %d nodes to try again, raising new event", again); + oi->t_ls_upd_event = + thread_add_event (master, ospf_ls_upd_send_queue_event, oi, 0); } if (IS_DEBUG_OSPF_EVENT) zlog_info ("ospf_ls_upd_send_queue stop"); + return 0; }