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
diff --git a/include/osmocom/core/osmo_io.h b/include/osmocom/core/osmo_io.h
index a539c8b..a5e6165 100644
--- a/include/osmocom/core/osmo_io.h
+++ b/include/osmocom/core/osmo_io.h
@@ -41,7 +41,7 @@
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 @@
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);
};
};
diff --git a/src/gb/gprs_ns2_udp.c b/src/gb/gprs_ns2_udp.c
index e9e9e38..0fc1b4b 100644
--- a/src/gb/gprs_ns2_udp.c
+++ b/src/gb/gprs_ns2_udp.c
@@ -223,7 +223,7 @@
}
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);
diff --git a/tests/osmo_io/osmo_io_test.c b/tests/osmo_io/osmo_io_test.c
index 1991926..bb99b54 100644
--- a/tests/osmo_io/osmo_io_test.c
+++ b/tests/osmo_io/osmo_io_test.c
@@ -49,7 +49,7 @@
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 @@
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);