summaryrefslogtreecommitdiff
path: root/pimd/pim_msdp_socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'pimd/pim_msdp_socket.c')
-rw-r--r--pimd/pim_msdp_socket.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/pimd/pim_msdp_socket.c b/pimd/pim_msdp_socket.c
index 805e812cae..9662f054e8 100644
--- a/pimd/pim_msdp_socket.c
+++ b/pimd/pim_msdp_socket.c
@@ -12,10 +12,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 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
+ * 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>
@@ -70,8 +69,9 @@ pim_msdp_sock_accept(struct thread *thread)
zlog_err ("accept_sock is negative value %d", accept_sock);
return -1;
}
- listener->thread = thread_add_read(master, pim_msdp_sock_accept,
- listener, accept_sock);
+ listener->thread = NULL;
+ thread_add_read(master, pim_msdp_sock_accept, listener, accept_sock,
+ &listener->thread);
/* accept client connection. */
msdp_sock = sockunion_accept(accept_sock, &su);
@@ -173,7 +173,9 @@ pim_msdp_sock_listen(void)
/* add accept thread */
listener->fd = sock;
memcpy(&listener->su, &sin, socklen);
- listener->thread = thread_add_read(msdp->master, pim_msdp_sock_accept, listener, sock);
+ listener->thread = NULL;
+ thread_add_read(msdp->master, pim_msdp_sock_accept, listener, sock,
+ &listener->thread);
msdp->flags |= PIM_MSDPF_LISTENER;
return 0;