Use osmo_fd_*_{disable,enable}
Change-Id: I5208124e08d3b403492fe83acee235e61e423450 Depends: libosmocore.git Idb89ba7bc7c129a6304a76900d17f47daf54d17d
This commit is contained in:
parent
e188010474
commit
4dc5dcf4e0
|
@ -10,3 +10,4 @@
|
||||||
manual needs common chapter cs7-config.adoc, vty_cpu_sched.adoc from osmo-gsm-manuals > 0.3.0
|
manual needs common chapter cs7-config.adoc, vty_cpu_sched.adoc from osmo-gsm-manuals > 0.3.0
|
||||||
osmo-msc Mobile Identity Coding OsmoMSC is stricter in rejecting invalid coding of Mobile Identity IEs
|
osmo-msc Mobile Identity Coding OsmoMSC is stricter in rejecting invalid coding of Mobile Identity IEs
|
||||||
libmosmo-mgcp-client needs osmo-mgw.git > 1.7.0 (8667d5169df8d06e10ee3f3104e4cd533d15ac57), ABI break due to struct size in mgcp_conn_peer and mgcp_response
|
libmosmo-mgcp-client needs osmo-mgw.git > 1.7.0 (8667d5169df8d06e10ee3f3104e4cd533d15ac57), ABI break due to struct size in mgcp_conn_peer and mgcp_response
|
||||||
|
osmo-msc update version dependency to version with osmo_fd_*_{disable,enable}
|
||||||
|
|
|
@ -65,7 +65,7 @@ int mncc_sock_from_cc(struct gsm_network *net, struct msgb *msg)
|
||||||
|
|
||||||
/* Actually enqueue the message and mark socket write need */
|
/* Actually enqueue the message and mark socket write need */
|
||||||
msgb_enqueue(&net->upqueue, msg);
|
msgb_enqueue(&net->upqueue, msg);
|
||||||
net->mncc_state->conn_bfd.when |= OSMO_FD_WRITE;
|
osmo_fd_write_enable(&net->mncc_state->conn_bfd);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ static void mncc_sock_close(struct mncc_sock_state *state)
|
||||||
osmo_fd_unregister(bfd);
|
osmo_fd_unregister(bfd);
|
||||||
|
|
||||||
/* re-enable the generation of ACCEPT for new connections */
|
/* re-enable the generation of ACCEPT for new connections */
|
||||||
state->listen_bfd.when |= OSMO_FD_READ;
|
osmo_fd_read_enable(&state->listen_bfd);
|
||||||
|
|
||||||
/* release all existing calls */
|
/* release all existing calls */
|
||||||
gsm0408_clear_all_trans(state->net, TRANS_CC);
|
gsm0408_clear_all_trans(state->net, TRANS_CC);
|
||||||
|
@ -146,7 +146,7 @@ static int mncc_sock_write(struct osmo_fd *bfd)
|
||||||
msg = llist_entry(net->upqueue.next, struct msgb, list);
|
msg = llist_entry(net->upqueue.next, struct msgb, list);
|
||||||
mncc_prim = (struct gsm_mncc *)msg->data;
|
mncc_prim = (struct gsm_mncc *)msg->data;
|
||||||
|
|
||||||
bfd->when &= ~OSMO_FD_WRITE;
|
osmo_fd_write_disable(bfd);
|
||||||
|
|
||||||
/* bug hunter 8-): maybe someone forgot msgb_put(...) ? */
|
/* bug hunter 8-): maybe someone forgot msgb_put(...) ? */
|
||||||
if (!msgb_length(msg)) {
|
if (!msgb_length(msg)) {
|
||||||
|
@ -161,7 +161,7 @@ static int mncc_sock_write(struct osmo_fd *bfd)
|
||||||
goto close;
|
goto close;
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
if (errno == EAGAIN) {
|
if (errno == EAGAIN) {
|
||||||
bfd->when |= OSMO_FD_WRITE;
|
osmo_fd_write_enable(bfd);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
goto close;
|
goto close;
|
||||||
|
@ -222,7 +222,7 @@ static void queue_hello(struct mncc_sock_state *mncc)
|
||||||
hello->lchan_type_offset = offsetof(struct gsm_mncc, lchan_type);
|
hello->lchan_type_offset = offsetof(struct gsm_mncc, lchan_type);
|
||||||
|
|
||||||
msgb_enqueue(&mncc->net->upqueue, msg);
|
msgb_enqueue(&mncc->net->upqueue, msg);
|
||||||
mncc->conn_bfd.when |= OSMO_FD_WRITE;
|
osmo_fd_write_enable(&mncc->conn_bfd);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* accept a new connection */
|
/* accept a new connection */
|
||||||
|
@ -245,7 +245,7 @@ static int mncc_sock_accept(struct osmo_fd *bfd, unsigned int flags)
|
||||||
LOGP(DMNCC, LOGL_NOTICE, "MNCC app connects but we already have "
|
LOGP(DMNCC, LOGL_NOTICE, "MNCC app connects but we already have "
|
||||||
"another active connection ?!?\n");
|
"another active connection ?!?\n");
|
||||||
/* We already have one MNCC app connected, this is all we support */
|
/* We already have one MNCC app connected, this is all we support */
|
||||||
state->listen_bfd.when &= ~OSMO_FD_READ;
|
osmo_fd_read_disable(&state->listen_bfd);
|
||||||
close(rc);
|
close(rc);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue