mirror of
				https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
				synced 2025-11-03 13:33:29 +00:00 
			
		
		
		
	src: use namespace prefix osmo_wqueue*
Summary of changes: s/struct write_queue/struct osmo_wqueue/g s/write_queue_init/osmo_wqueue_init/g s/write_queue_clear/osmo_wqueue_clear/g s/write_queue_enqueue/osmo_wqueue_enqueue/g s/write_queue_bfd_cb/osmo_wqueue_bfd_cb/g
This commit is contained in:
		@@ -35,7 +35,7 @@ struct bsc_msc_dest {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct bsc_msc_connection {
 | 
					struct bsc_msc_connection {
 | 
				
			||||||
	struct write_queue write_queue;
 | 
						struct osmo_wqueue write_queue;
 | 
				
			||||||
	int is_connected;
 | 
						int is_connected;
 | 
				
			||||||
	int is_authenticated;
 | 
						int is_authenticated;
 | 
				
			||||||
	int first_contact;
 | 
						int first_contact;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -76,7 +76,7 @@ struct bsc_connection {
 | 
				
			|||||||
	int authenticated;
 | 
						int authenticated;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* the fd we use to communicate */
 | 
						/* the fd we use to communicate */
 | 
				
			||||||
	struct write_queue write_queue;
 | 
						struct osmo_wqueue write_queue;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* the BSS associated */
 | 
						/* the BSS associated */
 | 
				
			||||||
	struct bsc_config *cfg;
 | 
						struct bsc_config *cfg;
 | 
				
			||||||
@@ -286,7 +286,7 @@ struct bsc_nat {
 | 
				
			|||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct bsc_nat_ussd_con {
 | 
					struct bsc_nat_ussd_con {
 | 
				
			||||||
	struct write_queue queue;
 | 
						struct osmo_wqueue queue;
 | 
				
			||||||
	struct bsc_nat *nat;
 | 
						struct bsc_nat *nat;
 | 
				
			||||||
	int authorized;
 | 
						int authorized;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -361,8 +361,8 @@ uint32_t bsc_mgcp_extract_ci(const char *resp);
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int bsc_write(struct bsc_connection *bsc, struct msgb *msg, int id);
 | 
					int bsc_write(struct bsc_connection *bsc, struct msgb *msg, int id);
 | 
				
			||||||
int bsc_do_write(struct write_queue *queue, struct msgb *msg, int id);
 | 
					int bsc_do_write(struct osmo_wqueue *queue, struct msgb *msg, int id);
 | 
				
			||||||
int bsc_write_msg(struct write_queue *queue, struct msgb *msg);
 | 
					int bsc_write_msg(struct osmo_wqueue *queue, struct msgb *msg);
 | 
				
			||||||
int bsc_write_cb(struct osmo_fd *bfd, struct msgb *msg);
 | 
					int bsc_write_cb(struct osmo_fd *bfd, struct msgb *msg);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* IMSI allow/deny handling */
 | 
					/* IMSI allow/deny handling */
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -135,7 +135,7 @@ struct mgcp_config {
 | 
				
			|||||||
	struct in_addr transcoder_in;
 | 
						struct in_addr transcoder_in;
 | 
				
			||||||
	int transcoder_remote_base;
 | 
						int transcoder_remote_base;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	struct write_queue gw_fd;
 | 
						struct osmo_wqueue gw_fd;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	struct mgcp_port_range bts_ports;
 | 
						struct mgcp_port_range bts_ports;
 | 
				
			||||||
	struct mgcp_port_range net_ports;
 | 
						struct mgcp_port_range net_ports;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -26,7 +26,7 @@ struct osmo_bsc_rf {
 | 
				
			|||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct osmo_bsc_rf_conn {
 | 
					struct osmo_bsc_rf_conn {
 | 
				
			||||||
	struct write_queue queue;
 | 
						struct osmo_wqueue queue;
 | 
				
			||||||
	struct osmo_bsc_rf *rf;
 | 
						struct osmo_bsc_rf *rf;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -59,7 +59,7 @@ struct osmo_msc_data {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* mgcp agent */
 | 
						/* mgcp agent */
 | 
				
			||||||
	struct write_queue mgcp_agent;
 | 
						struct osmo_wqueue mgcp_agent;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* rf ctl related bits */
 | 
						/* rf ctl related bits */
 | 
				
			||||||
	char *mid_call_txt;
 | 
						char *mid_call_txt;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -42,7 +42,7 @@ static void connection_loss(struct bsc_msc_connection *con)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	close(fd->fd);
 | 
						close(fd->fd);
 | 
				
			||||||
	fd->fd = -1;
 | 
						fd->fd = -1;
 | 
				
			||||||
	fd->cb = write_queue_bfd_cb;
 | 
						fd->cb = osmo_wqueue_bfd_cb;
 | 
				
			||||||
	fd->when = 0;
 | 
						fd->when = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	con->is_connected = 0;
 | 
						con->is_connected = 0;
 | 
				
			||||||
@@ -64,7 +64,7 @@ static int msc_connection_connect(struct osmo_fd *fd, unsigned int what)
 | 
				
			|||||||
	int rc;
 | 
						int rc;
 | 
				
			||||||
	int val;
 | 
						int val;
 | 
				
			||||||
	struct bsc_msc_connection *con;
 | 
						struct bsc_msc_connection *con;
 | 
				
			||||||
	struct write_queue *queue;
 | 
						struct osmo_wqueue *queue;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	socklen_t len = sizeof(val);
 | 
						socklen_t len = sizeof(val);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -73,7 +73,7 @@ static int msc_connection_connect(struct osmo_fd *fd, unsigned int what)
 | 
				
			|||||||
		return -1;
 | 
							return -1;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	queue = container_of(fd, struct write_queue, bfd);
 | 
						queue = container_of(fd, struct osmo_wqueue, bfd);
 | 
				
			||||||
	con = container_of(queue, struct bsc_msc_connection, write_queue);
 | 
						con = container_of(queue, struct bsc_msc_connection, write_queue);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* From here on we will either be connected or reconnect */
 | 
						/* From here on we will either be connected or reconnect */
 | 
				
			||||||
@@ -92,7 +92,7 @@ static int msc_connection_connect(struct osmo_fd *fd, unsigned int what)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* go to full operation */
 | 
						/* go to full operation */
 | 
				
			||||||
	fd->cb = write_queue_bfd_cb;
 | 
						fd->cb = osmo_wqueue_bfd_cb;
 | 
				
			||||||
	fd->when = BSC_FD_READ | BSC_FD_EXCEPT;
 | 
						fd->when = BSC_FD_READ | BSC_FD_EXCEPT;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	con->is_connected = 1;
 | 
						con->is_connected = 1;
 | 
				
			||||||
@@ -191,7 +191,7 @@ int bsc_msc_connect(struct bsc_msc_connection *con)
 | 
				
			|||||||
		return ret;
 | 
							return ret;
 | 
				
			||||||
	} else {
 | 
						} else {
 | 
				
			||||||
		fd->when = BSC_FD_READ | BSC_FD_EXCEPT;
 | 
							fd->when = BSC_FD_READ | BSC_FD_EXCEPT;
 | 
				
			||||||
		fd->cb = write_queue_bfd_cb;
 | 
							fd->cb = osmo_wqueue_bfd_cb;
 | 
				
			||||||
		con->is_connected = 1;
 | 
							con->is_connected = 1;
 | 
				
			||||||
		if (con->connected)
 | 
							if (con->connected)
 | 
				
			||||||
			con->connected(con);
 | 
								con->connected(con);
 | 
				
			||||||
@@ -219,13 +219,13 @@ struct bsc_msc_connection *bsc_msc_create(void *ctx, struct llist_head *dests)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	con->dests = dests;
 | 
						con->dests = dests;
 | 
				
			||||||
	con->write_queue.bfd.fd = -1;
 | 
						con->write_queue.bfd.fd = -1;
 | 
				
			||||||
	write_queue_init(&con->write_queue, 100);
 | 
						osmo_wqueue_init(&con->write_queue, 100);
 | 
				
			||||||
	return con;
 | 
						return con;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void bsc_msc_lost(struct bsc_msc_connection *con)
 | 
					void bsc_msc_lost(struct bsc_msc_connection *con)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	write_queue_clear(&con->write_queue);
 | 
						osmo_wqueue_clear(&con->write_queue);
 | 
				
			||||||
	osmo_timer_del(&con->timeout_timer);
 | 
						osmo_timer_del(&con->timeout_timer);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (con->write_queue.bfd.fd >= 0)
 | 
						if (con->write_queue.bfd.fd >= 0)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -102,7 +102,7 @@ static void mgcp_forward(struct osmo_msc_data *data, struct msgb *msg)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	msgb_put(mgcp, msgb_l2len(msg));
 | 
						msgb_put(mgcp, msgb_l2len(msg));
 | 
				
			||||||
	memcpy(mgcp->data, msg->l2h, mgcp->len);
 | 
						memcpy(mgcp->data, msg->l2h, mgcp->len);
 | 
				
			||||||
	if (write_queue_enqueue(&data->mgcp_agent, mgcp) != 0) {
 | 
						if (osmo_wqueue_enqueue(&data->mgcp_agent, mgcp) != 0) {
 | 
				
			||||||
		LOGP(DMGCP, LOGL_FATAL, "Could not queue message to MGCP GW.\n");
 | 
							LOGP(DMGCP, LOGL_FATAL, "Could not queue message to MGCP GW.\n");
 | 
				
			||||||
		msgb_free(mgcp);
 | 
							msgb_free(mgcp);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
@@ -144,7 +144,7 @@ static int mgcp_create_port(struct osmo_msc_data *data)
 | 
				
			|||||||
		return -1;
 | 
							return -1;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	write_queue_init(&data->mgcp_agent, 10);
 | 
						osmo_wqueue_init(&data->mgcp_agent, 10);
 | 
				
			||||||
	data->mgcp_agent.bfd.when = BSC_FD_READ;
 | 
						data->mgcp_agent.bfd.when = BSC_FD_READ;
 | 
				
			||||||
	data->mgcp_agent.bfd.data = data;
 | 
						data->mgcp_agent.bfd.data = data;
 | 
				
			||||||
	data->mgcp_agent.read_cb = mgcp_do_read;
 | 
						data->mgcp_agent.read_cb = mgcp_do_read;
 | 
				
			||||||
@@ -166,7 +166,7 @@ static int mgcp_create_port(struct osmo_msc_data *data)
 | 
				
			|||||||
int msc_queue_write(struct bsc_msc_connection *conn, struct msgb *msg, int proto)
 | 
					int msc_queue_write(struct bsc_msc_connection *conn, struct msgb *msg, int proto)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	ipaccess_prepend_header(msg, proto);
 | 
						ipaccess_prepend_header(msg, proto);
 | 
				
			||||||
	if (write_queue_enqueue(&conn->write_queue, msg) != 0) {
 | 
						if (osmo_wqueue_enqueue(&conn->write_queue, msg) != 0) {
 | 
				
			||||||
		LOGP(DMSC, LOGL_FATAL, "Failed to queue IPA/%d\n", proto);
 | 
							LOGP(DMSC, LOGL_FATAL, "Failed to queue IPA/%d\n", proto);
 | 
				
			||||||
		msgb_free(msg);
 | 
							msgb_free(msg);
 | 
				
			||||||
		return -1;
 | 
							return -1;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -69,7 +69,7 @@ static void send_resp(struct osmo_bsc_rf_conn *conn, char send)
 | 
				
			|||||||
	msg->l2h = msgb_put(msg, 1);
 | 
						msg->l2h = msgb_put(msg, 1);
 | 
				
			||||||
	msg->l2h[0] = send;
 | 
						msg->l2h[0] = send;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (write_queue_enqueue(&conn->queue, msg) != 0) {
 | 
						if (osmo_wqueue_enqueue(&conn->queue, msg) != 0) {
 | 
				
			||||||
		LOGP(DINP, LOGL_ERROR, "Failed to enqueue the answer.\n");
 | 
							LOGP(DINP, LOGL_ERROR, "Failed to enqueue the answer.\n");
 | 
				
			||||||
		msgb_free(msg);
 | 
							msgb_free(msg);
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
@@ -205,7 +205,7 @@ static int rf_read_cmd(struct osmo_fd *fd)
 | 
				
			|||||||
		LOGP(DINP, LOGL_ERROR, "Short read %d/%s\n", errno, strerror(errno));
 | 
							LOGP(DINP, LOGL_ERROR, "Short read %d/%s\n", errno, strerror(errno));
 | 
				
			||||||
		osmo_fd_unregister(fd);
 | 
							osmo_fd_unregister(fd);
 | 
				
			||||||
		close(fd->fd);
 | 
							close(fd->fd);
 | 
				
			||||||
		write_queue_clear(&conn->queue);
 | 
							osmo_wqueue_clear(&conn->queue);
 | 
				
			||||||
		talloc_free(conn);
 | 
							talloc_free(conn);
 | 
				
			||||||
		return -1;
 | 
							return -1;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
@@ -265,7 +265,7 @@ static int rf_ctl_accept(struct osmo_fd *bfd, unsigned int what)
 | 
				
			|||||||
		return -1;
 | 
							return -1;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	write_queue_init(&conn->queue, 10);
 | 
						osmo_wqueue_init(&conn->queue, 10);
 | 
				
			||||||
	conn->queue.bfd.data = conn;
 | 
						conn->queue.bfd.data = conn;
 | 
				
			||||||
	conn->queue.bfd.fd = fd;
 | 
						conn->queue.bfd.fd = fd;
 | 
				
			||||||
	conn->queue.bfd.when = BSC_FD_READ | BSC_FD_WRITE;
 | 
						conn->queue.bfd.when = BSC_FD_READ | BSC_FD_WRITE;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -478,7 +478,7 @@ void bsc_mgcp_forward(struct bsc_connection *bsc, struct msgb *msg)
 | 
				
			|||||||
		return;
 | 
							return;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (write_queue_enqueue(&bsc->nat->mgcp_cfg->gw_fd, output) != 0) {
 | 
						if (osmo_wqueue_enqueue(&bsc->nat->mgcp_cfg->gw_fd, output) != 0) {
 | 
				
			||||||
		LOGP(DMGCP, LOGL_ERROR, "Failed to queue MGCP msg.\n");
 | 
							LOGP(DMGCP, LOGL_ERROR, "Failed to queue MGCP msg.\n");
 | 
				
			||||||
		msgb_free(output);
 | 
							msgb_free(output);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
@@ -628,7 +628,7 @@ static int mgcp_do_read(struct osmo_fd *fd)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	/* we do have a direct answer... e.g. AUEP */
 | 
						/* we do have a direct answer... e.g. AUEP */
 | 
				
			||||||
	if (resp) {
 | 
						if (resp) {
 | 
				
			||||||
		if (write_queue_enqueue(&nat->mgcp_cfg->gw_fd, resp) != 0) {
 | 
							if (osmo_wqueue_enqueue(&nat->mgcp_cfg->gw_fd, resp) != 0) {
 | 
				
			||||||
			LOGP(DMGCP, LOGL_ERROR, "Failed to enqueue msg.\n");
 | 
								LOGP(DMGCP, LOGL_ERROR, "Failed to enqueue msg.\n");
 | 
				
			||||||
			msgb_free(resp);
 | 
								msgb_free(resp);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
@@ -698,7 +698,7 @@ int bsc_mgcp_nat_init(struct bsc_nat *nat)
 | 
				
			|||||||
		return -1;
 | 
							return -1;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	write_queue_init(&cfg->gw_fd, 10);
 | 
						osmo_wqueue_init(&cfg->gw_fd, 10);
 | 
				
			||||||
	cfg->gw_fd.bfd.when = BSC_FD_READ;
 | 
						cfg->gw_fd.bfd.when = BSC_FD_READ;
 | 
				
			||||||
	cfg->gw_fd.bfd.data = nat;
 | 
						cfg->gw_fd.bfd.data = nat;
 | 
				
			||||||
	cfg->gw_fd.read_cb = mgcp_do_read;
 | 
						cfg->gw_fd.read_cb = mgcp_do_read;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -100,7 +100,7 @@ static void queue_for_msc(struct bsc_msc_connection *con, struct msgb *msg)
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (write_queue_enqueue(&con->write_queue, msg) != 0) {
 | 
						if (osmo_wqueue_enqueue(&con->write_queue, msg) != 0) {
 | 
				
			||||||
		LOGP(DINP, LOGL_ERROR, "Failed to enqueue the write.\n");
 | 
							LOGP(DINP, LOGL_ERROR, "Failed to enqueue the write.\n");
 | 
				
			||||||
		msgb_free(msg);
 | 
							msgb_free(msg);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
@@ -877,7 +877,7 @@ void bsc_close_connection(struct bsc_connection *connection)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	osmo_fd_unregister(&connection->write_queue.bfd);
 | 
						osmo_fd_unregister(&connection->write_queue.bfd);
 | 
				
			||||||
	close(connection->write_queue.bfd.fd);
 | 
						close(connection->write_queue.bfd.fd);
 | 
				
			||||||
	write_queue_clear(&connection->write_queue);
 | 
						osmo_wqueue_clear(&connection->write_queue);
 | 
				
			||||||
	llist_del(&connection->list_entry);
 | 
						llist_del(&connection->list_entry);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	talloc_free(connection);
 | 
						talloc_free(connection);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -124,7 +124,7 @@ struct bsc_connection *bsc_connection_alloc(struct bsc_nat *nat)
 | 
				
			|||||||
		return NULL;
 | 
							return NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	con->nat = nat;
 | 
						con->nat = nat;
 | 
				
			||||||
	write_queue_init(&con->write_queue, 100);
 | 
						osmo_wqueue_init(&con->write_queue, 100);
 | 
				
			||||||
	return con;
 | 
						return con;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -335,16 +335,16 @@ int bsc_write(struct bsc_connection *bsc, struct msgb *msg, int proto)
 | 
				
			|||||||
	return bsc_do_write(&bsc->write_queue, msg, proto);
 | 
						return bsc_do_write(&bsc->write_queue, msg, proto);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int bsc_do_write(struct write_queue *queue, struct msgb *msg, int proto)
 | 
					int bsc_do_write(struct osmo_wqueue *queue, struct msgb *msg, int proto)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	/* prepend the header */
 | 
						/* prepend the header */
 | 
				
			||||||
	ipaccess_prepend_header(msg, proto);
 | 
						ipaccess_prepend_header(msg, proto);
 | 
				
			||||||
	return bsc_write_msg(queue, msg);
 | 
						return bsc_write_msg(queue, msg);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int bsc_write_msg(struct write_queue *queue, struct msgb *msg)
 | 
					int bsc_write_msg(struct osmo_wqueue *queue, struct msgb *msg)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	if (write_queue_enqueue(queue, msg) != 0) {
 | 
						if (osmo_wqueue_enqueue(queue, msg) != 0) {
 | 
				
			||||||
		LOGP(DINP, LOGL_ERROR, "Failed to enqueue the write.\n");
 | 
							LOGP(DINP, LOGL_ERROR, "Failed to enqueue the write.\n");
 | 
				
			||||||
		msgb_free(msg);
 | 
							msgb_free(msg);
 | 
				
			||||||
		return -1;
 | 
							return -1;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -60,7 +60,7 @@ static void bsc_nat_ussd_destroy(struct bsc_nat_ussd_con *con)
 | 
				
			|||||||
	close(con->queue.bfd.fd);
 | 
						close(con->queue.bfd.fd);
 | 
				
			||||||
	osmo_fd_unregister(&con->queue.bfd);
 | 
						osmo_fd_unregister(&con->queue.bfd);
 | 
				
			||||||
	osmo_timer_del(&con->auth_timeout);
 | 
						osmo_timer_del(&con->auth_timeout);
 | 
				
			||||||
	write_queue_clear(&con->queue);
 | 
						osmo_wqueue_clear(&con->queue);
 | 
				
			||||||
	talloc_free(con);
 | 
						talloc_free(con);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -218,7 +218,7 @@ static int ussd_listen_cb(struct osmo_fd *bfd, unsigned int what)
 | 
				
			|||||||
		return -1;
 | 
							return -1;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	write_queue_init(&conn->queue, 10);
 | 
						osmo_wqueue_init(&conn->queue, 10);
 | 
				
			||||||
	conn->queue.bfd.data = conn;
 | 
						conn->queue.bfd.data = conn;
 | 
				
			||||||
	conn->queue.bfd.fd = fd;
 | 
						conn->queue.bfd.fd = fd;
 | 
				
			||||||
	conn->queue.bfd.when = BSC_FD_READ;
 | 
						conn->queue.bfd.when = BSC_FD_READ;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user