misc: Fix compiler warning about incompatible pointers

This commit is contained in:
Holger Hans Peter Freyther 2011-01-06 14:13:44 +01:00
parent 02d45c00f5
commit 1cc7184bc9
4 changed files with 6 additions and 5 deletions

View File

@ -165,6 +165,6 @@ void cc_tx_to_mncc(struct gsm_network *net, struct msgb *msg);
int int_mncc_recv(struct gsm_network *net, struct msgb *msg);
/* input from CC code into mncc_sock */
void mncc_sock_from_cc(struct gsm_network *net, struct msgb *msg);
int mncc_sock_from_cc(struct gsm_network *net, struct msgb *msg);
#endif

View File

@ -51,7 +51,7 @@ extern const char *openbsc_copyright;
static int daemonize = 0;
extern void bsc_vty_init(void);
extern int bsc_bootstrap_network(int (*layer4)(struct gsm_network *, int, void *), const char *cfg_file);
extern int bsc_bootstrap_network(int (*layer4)(struct gsm_network *, struct msgb *), const char *cfg_file);
static void print_usage()
{

View File

@ -54,7 +54,7 @@ static int use_mncc_sock = 0;
#define DB_SYNC_INTERVAL 60, 0
static struct timer_list db_sync_timer;
extern int bsc_bootstrap_network(int (*mmc_rev)(struct gsm_network *, int, void *),
extern int bsc_bootstrap_network(int (*mncc_recv)(struct gsm_network *, struct msgb *),
const char *cfg_file);
extern int bsc_shutdown_net(struct gsm_network *net);

View File

@ -48,7 +48,7 @@ struct mncc_sock_state {
static struct mncc_sock_state *g_state;
/* input from CC code into mncc_sock */
void mncc_sock_from_cc(struct gsm_network *net, struct msgb *msg)
int mncc_sock_from_cc(struct gsm_network *net, struct msgb *msg)
{
struct gsm_mncc *mncc_in = (struct gsm_mncc *) msgb_data(msg);
int msg_type = mncc_in->msg_type;
@ -69,7 +69,7 @@ void mncc_sock_from_cc(struct gsm_network *net, struct msgb *msg)
}
/* free the original message */
msgb_free(msg);
return;
return -1;
}
/* FIXME: check for some maximum queue depth? */
@ -77,6 +77,7 @@ void mncc_sock_from_cc(struct gsm_network *net, struct msgb *msg)
/* Actually enqueue the message and mark socket write need */
msgb_enqueue(&net->upqueue, msg);
g_state->conn_bfd.when |= BSC_FD_WRITE;
return 0;
}
void mncc_sock_write_pending(void)