diff options
Diffstat (limited to 'ospfd/ospf_apiserver.c')
| -rw-r--r-- | ospfd/ospf_apiserver.c | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/ospfd/ospf_apiserver.c b/ospfd/ospf_apiserver.c index aac8ef4b8b..8e619f74c7 100644 --- a/ospfd/ospf_apiserver.c +++ b/ospfd/ospf_apiserver.c @@ -3,7 +3,7 @@ * Copyright (C) 2001, 2002 Ralph Keller * * This file is part of GNU Zebra. - * + * * GNU Zebra is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2, or (at your @@ -14,10 +14,9 @@ * 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> @@ -301,31 +300,27 @@ ospf_apiserver_event (enum event event, int fd, switch (event) { case OSPF_APISERVER_ACCEPT: - (void)thread_add_read (master, ospf_apiserver_accept, apiserv, fd); + (void) thread_add_read(master, ospf_apiserver_accept, apiserv, fd, NULL); break; case OSPF_APISERVER_SYNC_READ: - apiserv->t_sync_read = - thread_add_read (master, ospf_apiserver_read, apiserv, fd); + apiserv->t_sync_read = NULL; + thread_add_read(master, ospf_apiserver_read, apiserv, fd, + &apiserv->t_sync_read); break; #ifdef USE_ASYNC_READ case OSPF_APISERVER_ASYNC_READ: - apiserv->t_async_read = - thread_add_read (master, ospf_apiserver_read, apiserv, fd); + apiserv->t_async_read = NULL; + thread_add_read(master, ospf_apiserver_read, apiserv, fd, + &apiserv->t_async_read); break; #endif /* USE_ASYNC_READ */ case OSPF_APISERVER_SYNC_WRITE: - if (!apiserv->t_sync_write) - { - apiserv->t_sync_write = - thread_add_write (master, ospf_apiserver_sync_write, apiserv, fd); - } + thread_add_write(master, ospf_apiserver_sync_write, apiserv, fd, + &apiserv->t_sync_write); break; case OSPF_APISERVER_ASYNC_WRITE: - if (!apiserv->t_async_write) - { - apiserv->t_async_write = - thread_add_write (master, ospf_apiserver_async_write, apiserv, fd); - } + thread_add_write(master, ospf_apiserver_async_write, apiserv, fd, + &apiserv->t_async_write); break; } } |
