Message ID | 1515408521-31480-1-git-send-email-stefan@herbrechtsmeier.net |
---|---|
State | Changes Requested |
Headers | show |
Series | [1/3] progress_ipc: Add non-blocking receive support | expand |
What is status of this patch? I would like non blocking IPC support for progress IPC and I do not use mongoose webserver because I integrate with my own web server. On Monday, January 8, 2018 at 5:49:01 AM UTC-5, ste...@herbrechtsmeier.net wrote: > > From: Stefan Herbrechtsmeier <stefan.her...@weidmueller.com <javascript:>> > > > Signed-off-by: Stefan Herbrechtsmeier <stefan.her...@weidmueller.com > <javascript:>> > --- > ipc/progress_ipc.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/ipc/progress_ipc.c b/ipc/progress_ipc.c > index 881d2c7..ca60f67 100644 > --- a/ipc/progress_ipc.c > +++ b/ipc/progress_ipc.c > @@ -19,6 +19,7 @@ > > #include <sys/socket.h> > #include <sys/un.h> > +#include <errno.h> > #include <string.h> > #include <stdio.h> > #include <stdlib.h> > @@ -61,11 +62,16 @@ int progress_ipc_connect(bool reconnect) > > int progress_ipc_receive(int *connfd, struct progress_msg *msg) { > int ret = read(*connfd, msg, sizeof(*msg)); > + > + if (ret == -1 && errno == EAGAIN) > + return 0; > + > if (ret != sizeof(*msg)) { > fprintf(stdout, "Connection closing..\n"); > close(*connfd); > *connfd = -1; > return -1; > } > + > return ret; > } > -- > 2.7.4 > >
Hi Thomas, On 09.07.20 20:21, Thomas W. wrote: > What is status of this patch? All patches for SWUpdate are archived on patchwork and you can check there the status. In this case: http://patchwork.ozlabs.org/project/swupdate/list/?series=21891&state=* They are marked with "Changes requested" and archived. > I would like non blocking IPC support for > progress IPC and I do not use mongoose webserver because I integrate > with my own web server. In any case, this is a 2-years old patch. It should at least rebased and reposted for a new review. Best regards, Stefano Babic > > On Monday, January 8, 2018 at 5:49:01 AM UTC-5, > ste...@herbrechtsmeier.net wrote: > > From: Stefan Herbrechtsmeier <stefan.her...@weidmueller.com > <javascript:>> > > Signed-off-by: Stefan Herbrechtsmeier <stefan.her...@weidmueller.com > <javascript:>> > --- > ipc/progress_ipc.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/ipc/progress_ipc.c b/ipc/progress_ipc.c > index 881d2c7..ca60f67 100644 > --- a/ipc/progress_ipc.c > +++ b/ipc/progress_ipc.c > @@ -19,6 +19,7 @@ > > #include <sys/socket.h> > #include <sys/un.h> > +#include <errno.h> > #include <string.h> > #include <stdio.h> > #include <stdlib.h> > @@ -61,11 +62,16 @@ int progress_ipc_connect(bool reconnect) > > int progress_ipc_receive(int *connfd, struct progress_msg *msg) { > int ret = read(*connfd, msg, sizeof(*msg)); > + > + if (ret == -1 && errno == EAGAIN) > + return 0; > + > if (ret != sizeof(*msg)) { > fprintf(stdout, "Connection closing..\n"); > close(*connfd); > *connfd = -1; > return -1; > } > + > return ret; > } > -- > 2.7.4 > > -- > You received this message because you are subscribed to the Google > Groups "swupdate" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to swupdate+unsubscribe@googlegroups.com > <mailto:swupdate+unsubscribe@googlegroups.com>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/swupdate/644d4a8e-1422-442a-a279-13c404e160bao%40googlegroups.com > <https://groups.google.com/d/msgid/swupdate/644d4a8e-1422-442a-a279-13c404e160bao%40googlegroups.com?utm_medium=email&utm_source=footer>.
diff --git a/ipc/progress_ipc.c b/ipc/progress_ipc.c index 881d2c7..ca60f67 100644 --- a/ipc/progress_ipc.c +++ b/ipc/progress_ipc.c @@ -19,6 +19,7 @@ #include <sys/socket.h> #include <sys/un.h> +#include <errno.h> #include <string.h> #include <stdio.h> #include <stdlib.h> @@ -61,11 +62,16 @@ int progress_ipc_connect(bool reconnect) int progress_ipc_receive(int *connfd, struct progress_msg *msg) { int ret = read(*connfd, msg, sizeof(*msg)); + + if (ret == -1 && errno == EAGAIN) + return 0; + if (ret != sizeof(*msg)) { fprintf(stdout, "Connection closing..\n"); close(*connfd); *connfd = -1; return -1; } + return ret; }