diff options
author | Daniel Willmann <dwillmann@sysmocom.de> | 2023-06-08 13:43:24 +0200 |
---|---|---|
committer | Daniel Willmann <dwillmann@sysmocom.de> | 2023-06-08 13:44:44 +0200 |
commit | 2d340403f2bd56c767472262ad89069fab32629b (patch) | |
tree | ac55a97095d94f954497319b7d7bd22b9a058a6e | |
parent | 6aa4b6961c0f851d0406690d04991c34fe643cb4 (diff) |
stream: Properly name osmo_stream_srv read callback
Change-Id: I12d74e9b407f1ea7af83fb3ec4d03ad7228a27cf
-rw-r--r-- | include/osmocom/netif/stream.h | 2 | ||||
-rw-r--r-- | src/stream.c | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/include/osmocom/netif/stream.h b/include/osmocom/netif/stream.h index a52e7c4..b9a7c6d 100644 --- a/include/osmocom/netif/stream.h +++ b/include/osmocom/netif/stream.h @@ -44,7 +44,7 @@ void osmo_stream_srv_link_close(struct osmo_stream_srv_link *link); * osmo_stream_srv_link */ struct osmo_stream_srv; -struct osmo_stream_srv *osmo_stream_srv_create(void *ctx, struct osmo_stream_srv_link *link, int fd, int (*cb)(struct osmo_stream_srv *conn), int (*closed_cb)(struct osmo_stream_srv *conn), void *data); +struct osmo_stream_srv *osmo_stream_srv_create(void *ctx, struct osmo_stream_srv_link *link, int fd, int (*read_cb)(struct osmo_stream_srv *conn), int (*closed_cb)(struct osmo_stream_srv *conn), void *data); void *osmo_stream_srv_get_data(struct osmo_stream_srv *conn); struct osmo_stream_srv_link *osmo_stream_srv_get_master(struct osmo_stream_srv *conn); struct osmo_fd *osmo_stream_srv_get_ofd(struct osmo_stream_srv *srv); diff --git a/src/stream.c b/src/stream.c index 6afb7ca..c62d875 100644 --- a/src/stream.c +++ b/src/stream.c @@ -1307,7 +1307,7 @@ struct osmo_stream_srv { struct osmo_fd ofd; struct llist_head tx_queue; int (*closed_cb)(struct osmo_stream_srv *peer); - int (*cb)(struct osmo_stream_srv *peer); + int (*read_cb)(struct osmo_stream_srv *peer); void *data; int flags; }; @@ -1323,8 +1323,8 @@ static int osmo_stream_srv_read(struct osmo_stream_srv *conn) return 0; } - if (conn->cb) - rc = conn->cb(conn); + if (conn->read_cb) + rc = conn->read_cb(conn); return rc; } @@ -1415,7 +1415,7 @@ static int osmo_stream_srv_cb(struct osmo_fd *ofd, unsigned int what) struct osmo_stream_srv * osmo_stream_srv_create(void *ctx, struct osmo_stream_srv_link *link, int fd, - int (*cb)(struct osmo_stream_srv *conn), + int (*read_cb)(struct osmo_stream_srv *conn), int (*closed_cb)(struct osmo_stream_srv *conn), void *data) { struct osmo_stream_srv *conn; @@ -1430,7 +1430,7 @@ osmo_stream_srv_create(void *ctx, struct osmo_stream_srv_link *link, } conn->srv = link; osmo_fd_setup(&conn->ofd, fd, OSMO_FD_READ, osmo_stream_srv_cb, conn, 0); - conn->cb = cb; + conn->read_cb = read_cb; conn->closed_cb = closed_cb; conn->data = data; INIT_LLIST_HEAD(&conn->tx_queue); |