aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2014-03-31 13:42:11 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-04-01 13:40:59 +0200
commite827812051f1597db89da2b90e2899b5cd1955ea (patch)
tree6f1225e43215499ed079688e13fcf41021c465c9 /openbsc/include/openbsc
parent8a158bb1ea36d0f88da18d0f034884b30f09fda2 (diff)
ipa: Use enhanced ipa_msg_recv_buffered() to cope with partioned IPA messages
The old ipa_msg_recv() implementation didn't support partial receive, so IPA connections got disconnected when this happened. This patch adds the handling of the temporary message buffers and uses ipa_msg_recv_buffered(). It has been successfully tested by jerlbeck with osmo-nitb and osmo-bsc. Ticket: OW#768 Sponsored-by: On-Waves ehf
Diffstat (limited to 'openbsc/include/openbsc')
-rw-r--r--openbsc/include/openbsc/bsc_msc.h2
-rw-r--r--openbsc/include/openbsc/bsc_nat.h5
-rw-r--r--openbsc/include/openbsc/control_cmd.h3
3 files changed, 10 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/bsc_msc.h b/openbsc/include/openbsc/bsc_msc.h
index 647f47e56..0adbd266e 100644
--- a/openbsc/include/openbsc/bsc_msc.h
+++ b/openbsc/include/openbsc/bsc_msc.h
@@ -48,6 +48,8 @@ struct bsc_msc_connection {
void (*connected) (struct bsc_msc_connection *);
struct osmo_timer_list reconnect_timer;
struct osmo_timer_list timeout_timer;
+
+ struct msgb *pending_msg;
};
struct bsc_msc_connection *bsc_msc_create(void *ctx, struct llist_head *dest);
diff --git a/openbsc/include/openbsc/bsc_nat.h b/openbsc/include/openbsc/bsc_nat.h
index fe8e52137..7bd582cf6 100644
--- a/openbsc/include/openbsc/bsc_nat.h
+++ b/openbsc/include/openbsc/bsc_nat.h
@@ -97,6 +97,9 @@ struct bsc_connection {
/* the fd we use to communicate */
struct osmo_wqueue write_queue;
+ /* incoming message buffer */
+ struct msgb *pending_msg;
+
/* the BSS associated */
struct bsc_config *cfg;
@@ -343,6 +346,8 @@ struct bsc_nat_ussd_con {
struct bsc_nat *nat;
int authorized;
+ struct msgb *pending_msg;
+
struct osmo_timer_list auth_timeout;
};
diff --git a/openbsc/include/openbsc/control_cmd.h b/openbsc/include/openbsc/control_cmd.h
index 725dce061..8aede15df 100644
--- a/openbsc/include/openbsc/control_cmd.h
+++ b/openbsc/include/openbsc/control_cmd.h
@@ -39,6 +39,9 @@ struct ctrl_connection {
/* The queue for sending data back */
struct osmo_wqueue write_queue;
+ /* Buffer for partial input data */
+ struct msgb *pending_msg;
+
/* Callback if the connection was closed */
void (*closed_cb)(struct ctrl_connection *conn);