diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2017-04-10 16:53:32 +0800 |
---|---|---|
committer | Holger Freyther <holger@freyther.de> | 2017-04-29 11:56:14 +0000 |
commit | 4e93766a4bcdfc69869f635cc99e7301ba0ac43b (patch) | |
tree | 635f2ada534782550716c0df4842dd524ff2e13c | |
parent | a18caad5fd6131b1d8474154e7fefd9c462485bd (diff) |
misc: Call the variable ctx like in all other places
We couldn't figure out what "crx" as supposed to mean and assume
it is a typo. Fix the code and call it ctx, this is fixing the
API documentation as well.
Change-Id: I27ed1178fdbbcf3fc0e1070dc19b4ecf9a327a04
-rw-r--r-- | include/osmocom/netif/datagram.h | 6 | ||||
-rw-r--r-- | src/datagram.c | 16 |
2 files changed, 11 insertions, 11 deletions
diff --git a/include/osmocom/netif/datagram.h b/include/osmocom/netif/datagram.h index b7ecfe3..a0ff7b4 100644 --- a/include/osmocom/netif/datagram.h +++ b/include/osmocom/netif/datagram.h @@ -3,7 +3,7 @@ struct osmo_dgram_tx; -struct osmo_dgram_tx *osmo_dgram_tx_create(void *crx); +struct osmo_dgram_tx *osmo_dgram_tx_create(void *ctx); void osmo_dgram_tx_destroy(struct osmo_dgram_tx *conn); void osmo_dgram_tx_set_addr(struct osmo_dgram_tx *conn, const char *addr); @@ -19,7 +19,7 @@ void osmo_dgram_tx_send(struct osmo_dgram_tx *conn, struct msgb *msg); struct osmo_dgram_rx; -struct osmo_dgram_rx *osmo_dgram_rx_create(void *crx); +struct osmo_dgram_rx *osmo_dgram_rx_create(void *ctx); void osmo_dgram_rx_set_addr(struct osmo_dgram_rx *conn, const char *addr); void osmo_dgram_rx_set_port(struct osmo_dgram_rx *conn, uint16_t port); @@ -33,7 +33,7 @@ int osmo_dgram_rx_recv(struct osmo_dgram_rx *conn, struct msgb *msg); struct osmo_dgram; -struct osmo_dgram *osmo_dgram_create(void *crx); +struct osmo_dgram *osmo_dgram_create(void *ctx); void osmo_dgram_destroy(struct osmo_dgram *conn); int osmo_dgram_open(struct osmo_dgram *conn); diff --git a/src/datagram.c b/src/datagram.c index d98221f..c2c84e0 100644 --- a/src/datagram.c +++ b/src/datagram.c @@ -102,11 +102,11 @@ static int osmo_dgram_tx_fd_cb(struct osmo_fd *ofd, unsigned int what) * This function allocates a new \ref osmo_dgram_tx and initializes * it with default values * \returns Osmocom Datagram Transmitter; NULL on error */ -struct osmo_dgram_tx *osmo_dgram_tx_create(void *crx) +struct osmo_dgram_tx *osmo_dgram_tx_create(void *ctx) { struct osmo_dgram_tx *conn; - conn = talloc_zero(crx, struct osmo_dgram_tx); + conn = talloc_zero(ctx, struct osmo_dgram_tx); if (!conn) return NULL; @@ -276,11 +276,11 @@ static int osmo_dgram_rx_cb(struct osmo_fd *ofd, unsigned int what) * This function allocates a new \ref osmo_dgram_rx and initializes * it with default values * \returns Datagram Receiver; NULL on error */ -struct osmo_dgram_rx *osmo_dgram_rx_create(void *crx) +struct osmo_dgram_rx *osmo_dgram_rx_create(void *ctx) { struct osmo_dgram_rx *conn; - conn = talloc_zero(crx, struct osmo_dgram_rx); + conn = talloc_zero(ctx, struct osmo_dgram_rx); if (!conn) return NULL; @@ -398,22 +398,22 @@ dgram_rx_cb(struct osmo_dgram_rx *rx) * it with default values. Internally, the Transceiver is based on a * tuple of transmitter (\ref osmo_dgram_tx) and receiver (\ref osmo_dgram_rx) * \returns Osmocom Datagram Transceiver; NULL on error */ -struct osmo_dgram *osmo_dgram_create(void *crx) +struct osmo_dgram *osmo_dgram_create(void *ctx) { struct osmo_dgram *conn; - conn = talloc_zero(crx, struct osmo_dgram); + conn = talloc_zero(ctx, struct osmo_dgram); if (!conn) return NULL; - conn->rx= osmo_dgram_rx_create(crx); + conn->rx= osmo_dgram_rx_create(ctx); if (conn->rx == NULL) return NULL; osmo_dgram_rx_set_read_cb(conn->rx, dgram_rx_cb); conn->rx->data = conn; - conn->tx = osmo_dgram_tx_create(crx); + conn->tx = osmo_dgram_tx_create(ctx); if (conn->tx == NULL) { osmo_dgram_rx_destroy(conn->rx); return NULL; |