From bc25bcaea18728c86c5c4086e3ebd44faa6c16e9 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Fri, 19 Aug 2011 22:32:38 +0200 Subject: ipa: export ipaccess_rcvmsg_base() and return int --- include/osmocom/abis/ipa.h | 2 ++ src/input/ipaccess.c | 10 +++++----- 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; } -- cgit v1.2.3