Attention is currently required from: laforge, pespin, fixeria.
arehbein has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/31533 )
Change subject: common: Have PCU socket connection use osmo_wqueue ......................................................................
Patch Set 12:
(3 comments)
File src/common/pcu_sock.c:
https://gerrit.osmocom.org/c/osmo-bts/+/31533/comment/6cdaea42_6d2fda0e PS6, Line 990: pcu_sock_close(state);
Not sure what you are talking about arehbein. […]
My bad, thought I had already fixed this
https://gerrit.osmocom.org/c/osmo-bts/+/31533/comment/b7a2bcff_018f4e63 PS6, Line 1106: rc = osmo_wqueue_enqueue(&state->upqueue, m);
No, that's wrong. write() returning -EBADF doesn't mean we should return it. […]
Hope this is alright now. I added a `return -1;` in case of other errors (previous code didn't return any other `errno` constants). `osmo_wqueue_bfd_cb` treats all other return values the same, however I would still rather return a `-1` just so the function itself returns negative values for all errors/looks more consistent that way
File src/common/pcu_sock.c:
https://gerrit.osmocom.org/c/osmo-bts/+/31533/comment/92ddcf1d_9fb0e15a PS9, Line 1112: rc = write(bfd->fd, msgb_data(msg), msgb_length(msg));
you are dropping he errno==EAGAIN case here. […]
Yes, fixeria referred me to `osmo_wqueue_bfd_cb()`, which checks the returned value for some negative `errno` constants; in case of `rc == -EAGAIN`, it takes care of the readding of the `struct msgb`