diff options
author | Satheesh Kumar K <sathk@cumulusnetworks.com> | 2019-09-24 11:29:15 +0200 |
---|---|---|
committer | Satheesh Kumar K <sathk@cumulusnetworks.com> | 2019-10-04 04:42:09 +0200 |
commit | 40e79e94110c772bfb71b97b1d97e8ad35901b88 (patch) | |
tree | 3971f24b20fd8dd1a51ea0c2c4ffacb5e2e741a1 /zebra/zebra_mlag_private.c | |
parent | Zebra: ADD Protobuf Encoding & Decoding for MLAG Messages (diff) | |
download | frr-40e79e94110c772bfb71b97b1d97e8ad35901b88.tar.xz frr-40e79e94110c772bfb71b97b1d97e8ad35901b88.zip |
Zebra: Fixing Review comments in Zebra_MLAG
Signed-off-by: Satheesh Kumar K <sathk@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_mlag_private.c')
-rw-r--r-- | zebra/zebra_mlag_private.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/zebra/zebra_mlag_private.c b/zebra/zebra_mlag_private.c index a5637c67a..896e78ca0 100644 --- a/zebra/zebra_mlag_private.c +++ b/zebra/zebra_mlag_private.c @@ -1,5 +1,5 @@ /* Zebra Mlag Code. - * Copyright (C) 2018 Cumulus Networks, Inc. + * Copyright (C) 2019 Cumulus Networks, Inc. * Donald Sharp * * This file is part of FRR. @@ -68,8 +68,10 @@ int zebra_mlag_private_write_data(uint8_t *data, uint32_t len) static void zebra_mlag_sched_read(void) { + pthread_mutex_lock(&zrouter.mlag_info.mlag_th_mtx); thread_add_read(zmlag_master, zebra_mlag_read, NULL, mlag_socket, &zrouter.mlag_info.t_read); + pthread_mutex_unlock(&zrouter.mlag_info.mlag_th_mtx); } static int zebra_mlag_read(struct thread *thread) @@ -78,7 +80,9 @@ static int zebra_mlag_read(struct thread *thread) uint32_t h_msglen; uint32_t tot_len, curr_len = mlag_rd_buf_offset; + pthread_mutex_lock(&zrouter.mlag_info.mlag_th_mtx); zrouter.mlag_info.t_read = NULL; + pthread_mutex_unlock(&zrouter.mlag_info.mlag_th_mtx); /* * Received message in sock_stream looks like below |