aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-08-19 22:32:38 +0200
committerHarald Welte <laforge@gnumonks.org>2011-08-19 22:32:38 +0200
commitbc25bcaea18728c86c5c4086e3ebd44faa6c16e9 (patch)
treec51f040a48c446a5c2c5e604f26022c85e642faf
parent7b6fc2e4802b84047bc47864c42ba2ab1b3c362d (diff)
ipa: export ipaccess_rcvmsg_base() and return intv0.0.2
-rw-r--r--include/osmocom/abis/ipa.h2
-rw-r--r--src/input/ipaccess.c10
2 files changed, 7 insertions, 5 deletions
diff --git a/include/osmocom/abis/ipa.h b/include/osmocom/abis/ipa.h
index 2254629..1a10ba9 100644
--- a/include/osmocom/abis/ipa.h
+++ b/include/osmocom/abis/ipa.h
@@ -66,4 +66,6 @@ void ipa_client_link_send(struct ipa_client_link *link, struct msgb *msg);
int ipa_msg_recv(int fd, struct msgb **rmsg);
+int ipaccess_rcvmsg_base(struct msgb *msg, struct osmo_fd *bfd);
+
#endif
diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c
index 602aded..b7391b3 100644
--- a/src/input/ipaccess.c
+++ b/src/input/ipaccess.c
@@ -187,24 +187,24 @@ int ipaccess_send_id_req(int fd)
}
/* base handling of the ip.access protocol */
-static bool ipaccess_rcvmsg_base(struct msgb *msg, struct osmo_fd *bfd)
+int ipaccess_rcvmsg_base(struct msgb *msg, struct osmo_fd *bfd)
{
- bool ipa_ccm = false;
+ int ipa_ccm = 0;
uint8_t msg_type = *(msg->l2h);
int ret = 0;
switch (msg_type) {
case IPAC_MSGT_PING:
- ipa_ccm = true;
+ ipa_ccm = 1;
ret = ipaccess_send_pong(bfd->fd);
break;
case IPAC_MSGT_PONG:
DEBUGP(DLMI, "PONG!\n");
- ipa_ccm = true;
+ ipa_ccm = 1;
break;
case IPAC_MSGT_ID_ACK:
DEBUGP(DLMI, "ID_ACK? -> ACK!\n");
- ipa_ccm = true;
+ ipa_ccm = 1;
ret = ipaccess_send_id_ack(bfd->fd);
break;
}