Change fd[0] with FD_EVENT and fd[1] with FD_GENERAL.
---
nsm.c | 4 ++--
raw.c | 4 ++--
udp.c | 4 ++--
udp6.c | 4 ++--
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/nsm.c b/nsm.c
index 9f9db5e..1e801ea 100644
--- a/nsm.c
+++ b/nsm.c
@@ -540,8 +540,8 @@ int main(int argc, char *argv[])
batch_mode = 1;
}
- pollfd[0].fd = nsm->fda.fd[0];
- pollfd[1].fd = nsm->fda.fd[1];
+ pollfd[0].fd = nsm->fda.fd[FD_EVENT];
+ pollfd[1].fd = nsm->fda.fd[FD_GENERAL];
pollfd[2].fd = batch_mode ? -1 : STDIN_FILENO;
pollfd[0].events = POLLIN | POLLPRI;
pollfd[1].events = POLLIN | POLLPRI;
diff --git a/raw.c b/raw.c
index a76fab6..f73e895 100644
--- a/raw.c
+++ b/raw.c
@@ -193,8 +193,8 @@ static int raw_configure(int fd, int event, int index,
static int raw_close(struct transport *t, struct fdarray *fda)
{
- close(fda->fd[0]);
- close(fda->fd[1]);
+ close(fda->fd[FD_EVENT]);
+ close(fda->fd[FD_GENERAL]);
return 0;
}
diff --git a/udp.c b/udp.c
index 7c9402e..b9ef777 100644
--- a/udp.c
+++ b/udp.c
@@ -85,8 +85,8 @@ static int mcast_join(int fd, int index, const struct
sockaddr_in *sa)
static int udp_close(struct transport *t, struct fdarray *fda)
{
- close(fda->fd[0]);
- close(fda->fd[1]);
+ close(fda->fd[FD_EVENT]);
+ close(fda->fd[FD_GENERAL]);
return 0;
}
diff --git a/udp6.c b/udp6.c
index bde1710..bdb96c9 100644
--- a/udp6.c
+++ b/udp6.c
@@ -96,8 +96,8 @@ static int mc_join(int fd, int index, const struct
sockaddr_in6 *sa)
static int udp6_close(struct transport *t, struct fdarray *fda)
{
- close(fda->fd[0]);
- close(fda->fd[1]);
+ close(fda->fd[FD_EVENT]);
+ close(fda->fd[FD_GENERAL]);
return 0;
}
--
2.41.0
_______________________________________________
Linuxptp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel