From ff9592fa101cf6aea4bff58f480e69456eef9390 Mon Sep 17 00:00:00 2001 From: Holger Freyther Date: Mon, 9 Mar 2009 16:17:14 +0000 Subject: [PATCH] [misc] Fix compile warnings... --- include/openbsc/e1_input.h | 6 ++++++ include/openbsc/misdn.h | 5 +++-- src/bsc_hack.c | 3 +++ src/e1_config.c | 3 ++- src/e1_input.c | 6 +++++- src/input/ipaccess.c | 5 +++-- 6 files changed, 22 insertions(+), 6 deletions(-) diff --git a/include/openbsc/e1_input.h b/include/openbsc/e1_input.h index 68b8d634a..7804fa4c6 100644 --- a/include/openbsc/e1_input.h +++ b/include/openbsc/e1_input.h @@ -139,4 +139,10 @@ int e1inp_event(struct e1inp_ts *ts, int evt, u_int8_t tei, u_int8_t sapi); /* called by TRAU muxer to obtain the destination mux entity */ struct subch_mux *e1inp_get_mux(u_int8_t e1_nr, u_int8_t ts_nr); +/* e1_config.c */ +int e1_config(struct gsm_bts *bts); +int ia_config(struct gsm_bts *bts); +int ipaccess_setup(struct e1inp_line *line); + + #endif /* _E1_INPUT_H */ diff --git a/include/openbsc/misdn.h b/include/openbsc/misdn.h index 51932c2bb..5d9013a83 100644 --- a/include/openbsc/misdn.h +++ b/include/openbsc/misdn.h @@ -20,8 +20,9 @@ #ifndef MISDN_H #define MISDN_H -int mi_setup(struct gsm_bts *bts, int cardnr, - void (cb)(int event, struct gsm_bts *bts)); +#include "e1_input.h" + +int mi_setup(int cardnr, struct e1inp_line *line); void mi_set_pcap_fd(int fd); int _abis_nm_sendmsg(struct msgb *msg); diff --git a/src/bsc_hack.c b/src/bsc_hack.c index c99159c7e..81ff7f0bd 100644 --- a/src/bsc_hack.c +++ b/src/bsc_hack.c @@ -428,6 +428,9 @@ int nm_state_event(enum nm_evt evt, u_int8_t obj_class, void *obj, break; } break; + case EVT_STATECHG_ADM: + DEBUGP(DMM, "Unhandled state change in %s:%d\n", __func__, __LINE__); + break; } return 0; } diff --git a/src/e1_config.c b/src/e1_config.c index b150e1d2a..0aef19d57 100644 --- a/src/e1_config.c +++ b/src/e1_config.c @@ -4,6 +4,7 @@ #include #include #include +#include #define SAPI_L2ML 0 #define SAPI_OML 62 @@ -67,7 +68,7 @@ int e1_config(struct gsm_bts *bts) bts->trx[1].rsl_link = rsl_link; #endif - return mi_setup(0, line, NULL); + return mi_setup(0, line); } /* do some compiled-in configuration for our BTS/E1 setup */ diff --git a/src/e1_input.c b/src/e1_input.c index cd2311557..a319dcc5e 100644 --- a/src/e1_input.c +++ b/src/e1_input.c @@ -57,6 +57,9 @@ static LLIST_HEAD(driver_list); /* list of all E1 lines */ static LLIST_HEAD(line_list); +/* to be implemented, e.g. by bsc_hack.c */ +void input_event(int event, enum e1inp_sign_type type, struct gsm_bts_trx *trx); + #if 0 /* * pcap writing of the misdn load @@ -430,7 +433,8 @@ int e1inp_event(struct e1inp_ts *ts, int evt, u_int8_t tei, u_int8_t sapi) return -EINVAL; /* FIXME: report further upwards */ - return input_event(evt, link->type, link->trx); + input_event(evt, link->type, link->trx); + return 0; } /* register a driver with the E1 core */ diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c index 6c83d6d3d..d5291ab04 100644 --- a/src/input/ipaccess.c +++ b/src/input/ipaccess.c @@ -56,10 +56,11 @@ static const u_int8_t id_ack[] = { 0, 1, IPAC_PROTO_IPACCESS, IPAC_MSGT_ID_ACK } static int ipaccess_rcvmsg(struct msgb *msg, int fd) { u_int8_t msg_type = *(msg->l2h); + int ret = 0; switch (msg_type) { case IPAC_MSGT_PING: - write(fd, pong, sizeof(pong)); + ret = write(fd, pong, sizeof(pong)); break; case IPAC_MSGT_PONG: DEBUGP(DMI, "PONG!\n"); @@ -69,7 +70,7 @@ static int ipaccess_rcvmsg(struct msgb *msg, int fd) break; case IPAC_MSGT_ID_ACK: DEBUGP(DMI, "ID_ACK? -> ACK!\n"); - write(fd, id_ack, sizeof(id_ack)); + ret = write(fd, id_ack, sizeof(id_ack)); break; }