dexter has submitted this change. ( https://gerrit.osmocom.org/c/osmo-e1d/+/32335 )
Change subject: proto_clnt: fix function prototype
......................................................................
proto_clnt: fix function prototype
The function prototype for osmo_e1dp_client_destroy has a different
parameter name in its signature in proto_clnt.h than in prto_clnt.c,
let's rename it so that both are coherent. (srv -> clnt)
Change-Id: I8bd4fbdf2bda332870da1b915a7898c396a85b0f
---
M include/osmocom/e1d/proto_clnt.h
1 file changed, 14 insertions(+), 1 deletion(-)
Approvals:
tnt: Looks good to me, but someone else must approve
pespin: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/include/osmocom/e1d/proto_clnt.h b/include/osmocom/e1d/proto_clnt.h
index 1473716..53ccf89 100644
--- a/include/osmocom/e1d/proto_clnt.h
+++ b/include/osmocom/e1d/proto_clnt.h
@@ -30,7 +30,7 @@
struct osmo_e1dp_client;
struct osmo_e1dp_client *osmo_e1dp_client_create(void *ctx, const char *path);
-void osmo_e1dp_client_destroy(struct osmo_e1dp_client *srv);
+void osmo_e1dp_client_destroy(struct osmo_e1dp_client *clnt);
int osmo_e1dp_client_intf_query(struct osmo_e1dp_client *clnt,
struct osmo_e1dp_intf_info **ii, int *n,
--
To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/32335
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: I8bd4fbdf2bda332870da1b915a7898c396a85b0f
Gerrit-Change-Number: 32335
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: tnt <tnt(a)246tNt.com>
Gerrit-MessageType: merged
dexter has submitted this change. ( https://gerrit.osmocom.org/c/osmo-e1d/+/32388 )
Change subject: proto_clnt: close osmo-e1d control socket on connection loss
......................................................................
proto_clnt: close osmo-e1d control socket on connection loss
When osmo-e1d is terminated the socket file descriptor on the client
side will get permanent POLLHUP events. This means that the registered
callback gets called with flags OSMO_FD_READ but the received data will
be of length zero. We must detect this situations and close the file
descriptor on connection loss. Otherwise we would get called over and
over again in an endless loop, resulting in 100% CPU usage.
Related: OS#5983
Change-Id: I3e1a29a9701a9432f58ef7cfedc32c916203017a
---
M src/proto_clnt.c
1 file changed, 22 insertions(+), 1 deletion(-)
Approvals:
Jenkins Builder: Verified
diff --git a/src/proto_clnt.c b/src/proto_clnt.c
index c703432..5b9a467 100644
--- a/src/proto_clnt.c
+++ b/src/proto_clnt.c
@@ -88,8 +88,12 @@
struct osmo_e1dp_msg_hdr *hdr;
msgb = osmo_e1dp_recv(ofd, NULL);
- if (!msgb)
+ if (!msgb) {
+ LOGP(DE1D, LOGL_ERROR, "Lost connection with osmo-e1d control socket.\n");
+ close(ofd->fd);
+ ofd->fd = 0;
goto err;
+ }
hdr = msgb_l1(msgb);
if ((hdr->type & E1DP_TYPE_MSK) != E1DP_EVT_TYPE)
--
To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/32388
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: I3e1a29a9701a9432f58ef7cfedc32c916203017a
Gerrit-Change-Number: 32388
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-MessageType: merged
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-e1d/+/32388 )
Change subject: proto_clnt: close osmo-e1d control socket on connection loss
......................................................................
proto_clnt: close osmo-e1d control socket on connection loss
When osmo-e1d is terminated the socket file descriptor on the client
side will get permanent POLLHUP events. This means that the registered
callback gets called with flags OSMO_FD_READ but the received data will
be of length zero. We must detect this situations and close the file
descriptor on connection loss. Otherwise we would get called over and
over again in an endless loop, resulting in 100% CPU usage.
Related: OS#5983
Change-Id: I3e1a29a9701a9432f58ef7cfedc32c916203017a
---
M src/proto_clnt.c
1 file changed, 22 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-e1d refs/changes/88/32388/1
diff --git a/src/proto_clnt.c b/src/proto_clnt.c
index c703432..5b9a467 100644
--- a/src/proto_clnt.c
+++ b/src/proto_clnt.c
@@ -88,8 +88,12 @@
struct osmo_e1dp_msg_hdr *hdr;
msgb = osmo_e1dp_recv(ofd, NULL);
- if (!msgb)
+ if (!msgb) {
+ LOGP(DE1D, LOGL_ERROR, "Lost connection with osmo-e1d control socket.\n");
+ close(ofd->fd);
+ ofd->fd = 0;
goto err;
+ }
hdr = msgb_l1(msgb);
if ((hdr->type & E1DP_TYPE_MSK) != E1DP_EVT_TYPE)
--
To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/32388
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: I3e1a29a9701a9432f58ef7cfedc32c916203017a
Gerrit-Change-Number: 32388
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newchange
dexter has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-e1d/+/32386 )
Change subject: proto_clnt: close osmo-e1d control socket on connection loss
......................................................................
Abandoned
commit hook bug!
--
To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/32386
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: Ib849e0ec1a1cca77eb588076d1d2201594b5c568
Gerrit-Change-Number: 32386
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: abandon
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-e1d/+/32386
to look at the new patch set (#2).
Change subject: proto_clnt: close osmo-e1d control socket on connection loss
......................................................................
proto_clnt: close osmo-e1d control socket on connection loss
When osmo-e1d is terminated the socket file descriptor on the client
side will get permanent POLLHUP events. This means that the registered
callback gets called with flags OSMO_FD_READ but the received data will
be of length zero. We must detect this situations and close the file
descriptor on connection loss. Otherwise we would get called over and
over again in an endless loop, resulting in 100% CPU usage.
Related: OS#5983
Change-Id: Ib849e0ec1a1cca77eb588076d1d2201594b5c568
---
M src/proto_clnt.c
1 file changed, 22 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-e1d refs/changes/86/32386/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/32386
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: Ib849e0ec1a1cca77eb588076d1d2201594b5c568
Gerrit-Change-Number: 32386
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset
dexter has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-e1d/+/32387 )
Change subject: proto_clnt: close osmo-e1d control socket on connection loss
......................................................................
Abandoned
commit-hook bug!
--
To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/32387
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: I4c8d20917cb6b1d1666b6d73ba2205b5ed7c56b0
Gerrit-Change-Number: 32387
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-CC: Jenkins Builder
Gerrit-MessageType: abandon
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-e1d/+/32387 )
Change subject: proto_clnt: close osmo-e1d control socket on connection loss
......................................................................
proto_clnt: close osmo-e1d control socket on connection loss
When osmo-e1d is terminated the socket file descriptor on the client
side will get permanent POLLHUP events. This means that the registered
callback gets called with flags OSMO_FD_READ but the received data will
be of length zero. We must detect this situations and close the file
descriptor on connection loss. Otherwise we would get called over and
over again in an endless loop, resulting in 100% CPU usage.
Related OS#5983
Change-Id: Ib849e0ec1a1cca77eb588076d1d2201594b5c568
Change-Id: I4c8d20917cb6b1d1666b6d73ba2205b5ed7c56b0
---
M src/proto_clnt.c
1 file changed, 24 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-e1d refs/changes/87/32387/1
diff --git a/src/proto_clnt.c b/src/proto_clnt.c
index c703432..5b9a467 100644
--- a/src/proto_clnt.c
+++ b/src/proto_clnt.c
@@ -88,8 +88,12 @@
struct osmo_e1dp_msg_hdr *hdr;
msgb = osmo_e1dp_recv(ofd, NULL);
- if (!msgb)
+ if (!msgb) {
+ LOGP(DE1D, LOGL_ERROR, "Lost connection with osmo-e1d control socket.\n");
+ close(ofd->fd);
+ ofd->fd = 0;
goto err;
+ }
hdr = msgb_l1(msgb);
if ((hdr->type & E1DP_TYPE_MSK) != E1DP_EVT_TYPE)
--
To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/32387
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: I4c8d20917cb6b1d1666b6d73ba2205b5ed7c56b0
Gerrit-Change-Number: 32387
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newchange