osmo_io: Add function to change the maximum length of the tx_queue

Change-Id: If3d1de8bffe1123002515878655ea9e02b482888
diff --git a/src/core/osmo_io.c b/src/core/osmo_io.c
index 8217316..90ea674 100644
--- a/src/core/osmo_io.c
+++ b/src/core/osmo_io.c
@@ -542,6 +542,15 @@
 	iofd->msgb_alloc.size = size;
 }
 
+/*! Set the maximum number of messages enqueued for sending.
+ *  \param[in] iofd the file descriptor
+ *  \param[in] size the maximum size of the transmit queue
+ */
+void osmo_iofd_set_txqueue_max_length(struct osmo_io_fd *iofd, unsigned int max_length)
+{
+	iofd->tx_queue.max_length = max_length;
+}
+
 /*! Get the associated user-data from an iofd
  *  \param[in] iofd the file descriptor
  *  \returns the data that was previously set with \ref osmo_iofd_setup()