osmo_io: Don't make msg in write_cb const

This was discussed in a previous change, but the change was merged
as-is.

Change-Id: I8b4a2dd7a336dea5c52c9da6e78bbc4d5f2a02f8
This commit is contained in:
Daniel Willmann 2023-06-06 11:34:14 +02:00
parent 2dd8da6b98
commit 3ed87720b3
3 changed files with 5 additions and 5 deletions

View File

@ -41,7 +41,7 @@ struct osmo_io_ops {
void (*read_cb)(struct osmo_io_fd *iofd, int res, struct msgb *msg);
/*! call-back function when write has completed on fd */
void (*write_cb)(struct osmo_io_fd *iofd, int res,
const struct msgb *msg);
struct msgb *msg);
/*! call-back function to segment the data at message boundaries.
* Needs to return the size of the next message. If it returns
* -EAGAIN or a value larger than msgb_length() (message is incomplete)
@ -58,7 +58,7 @@ struct osmo_io_ops {
const struct osmo_sockaddr *saddr);
/*! call-back function emulating sendto */
void (*sendto_cb)(struct osmo_io_fd *iofd, int res,
const struct msgb *msg,
struct msgb *msg,
const struct osmo_sockaddr *daddr);
};
};

View File

@ -223,7 +223,7 @@ out:
}
static void handle_nsip_sendto(struct osmo_io_fd *iofd, int res,
const struct msgb *msg,
struct msgb *msg,
const struct osmo_sockaddr *daddr)
{
struct gprs_ns2_vc_bind *bind = osmo_iofd_get_data(iofd);

View File

@ -49,7 +49,7 @@ static void read_cb(struct osmo_io_fd *iofd, int rc, struct msgb *msg)
talloc_free(msg);
}
static void write_cb(struct osmo_io_fd *iofd, int rc, const struct msgb *msg)
static void write_cb(struct osmo_io_fd *iofd, int rc, struct msgb *msg)
{
printf("%s: write() returned rc=%d\n", osmo_iofd_get_name(iofd), rc);
}
@ -109,7 +109,7 @@ static void recvfrom_cb(struct osmo_io_fd *iofd, int rc, struct msgb *msg,
talloc_free(msg);
}
static void sendto_cb(struct osmo_io_fd *iofd, int rc, const struct msgb *msg,
static void sendto_cb(struct osmo_io_fd *iofd, int rc, struct msgb *msg,
const struct osmo_sockaddr *daddr)
{
printf("%s: sendto() returned rc=%d\n", osmo_iofd_get_name(iofd), rc);