aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/isup_types.h2
-rw-r--r--include/mtp_data.h1
-rw-r--r--src/isup.c9
-rw-r--r--src/main.c5
-rw-r--r--src/main_stp.c8
-rw-r--r--src/main_udt.c5
-rw-r--r--src/mtp_layer3.c2
-rw-r--r--tests/isup/isup_parse_test.c5
8 files changed, 29 insertions, 8 deletions
diff --git a/include/isup_types.h b/include/isup_types.h
index 5347cb4..7eff76c 100644
--- a/include/isup_types.h
+++ b/include/isup_types.h
@@ -47,7 +47,7 @@ struct isup_msg_grs {
uint8_t pointer_int;
};
-int mtp_link_set_forward_isup(struct mtp_link_set *link, struct msgb *msg, int sls);
+int mtp_link_set_isup(struct mtp_link_set *link, struct msgb *msg, int sls);
int isup_parse_grs(const uint8_t *data, uint8_t length);
diff --git a/include/mtp_data.h b/include/mtp_data.h
index fd886a1..652c024 100644
--- a/include/mtp_data.h
+++ b/include/mtp_data.h
@@ -112,6 +112,7 @@ void mtp_link_set_init(void);
/* to be implemented for MSU sending */
void mtp_link_set_submit(struct mtp_link *link, struct msgb *msg);
void mtp_link_set_forward_sccp(struct mtp_link_set *link, struct msgb *msg, int sls);
+void mtp_link_set_forward_isup(struct mtp_link_set *link, struct msgb *msg, int sls);
void mtp_link_restart(struct mtp_link *link);
void mtp_link_set_sccp_down(struct mtp_link_set *link);
diff --git a/src/isup.c b/src/isup.c
index 340af16..33f1fdb 100644
--- a/src/isup.c
+++ b/src/isup.c
@@ -1,6 +1,6 @@
/*
- * (C) 2010 by Holger Hans Peter Freyther <zecke@selfish.org>
- * (C) 2010 by On-Waves
+ * (C) 2010-2011 by Holger Hans Peter Freyther <zecke@selfish.org>
+ * (C) 2010-2011 by On-Waves
* All Rights Reserved
*
* This program is free software: you can redistribute it and/or modify
@@ -109,7 +109,7 @@ static int handle_circuit_reset_grs(struct mtp_link_set *link, int sls, int cic,
return 0;
}
-int mtp_link_set_forward_isup(struct mtp_link_set *link, struct msgb *msg, int sls)
+int mtp_link_set_isup(struct mtp_link_set *link, struct msgb *msg, int sls)
{
int rc = -1;
int payload_size;
@@ -128,7 +128,8 @@ int mtp_link_set_forward_isup(struct mtp_link_set *link, struct msgb *msg, int s
rc = handle_circuit_reset_grs(link, sls, hdr->cic, hdr->data, payload_size);
break;
default:
- LOGP(DISUP, LOGL_NOTICE, "ISUP msg not handled: 0x%x\n", hdr->msg_type);
+ mtp_link_set_forward_isup(link, msg, sls);
+ rc = 0;
break;
}
diff --git a/src/main.c b/src/main.c
index 3163527..2a03657 100644
--- a/src/main.c
+++ b/src/main.c
@@ -127,6 +127,11 @@ void mtp_link_set_forward_sccp(struct mtp_link_set *link, struct msgb *_msg, int
msc_send_msg(&bsc, rc, &result, _msg);
}
+void mtp_link_set_forward_isup(struct mtp_link_set *set, struct msgb *msg, int sls)
+{
+ LOGP(DINP, LOGL_ERROR, "ISUP is not handled.\n");
+}
+
/*
* handle local message in close down mode
*/
diff --git a/src/main_stp.c b/src/main_stp.c
index c038b2b..fb10ea3 100644
--- a/src/main_stp.c
+++ b/src/main_stp.c
@@ -75,6 +75,14 @@ void mtp_link_set_forward_sccp(struct mtp_link_set *link, struct msgb *_msg, int
mtp_link_set_submit_sccp_data(target, sls, _msg->l2h, msgb_l2len(_msg));
}
+void mtp_link_set_forward_isup(struct mtp_link_set *set, struct msgb *msg, int sls)
+{
+ struct mtp_link_set *target;
+
+ target = bsc.m2ua_set == set ? bsc.link_set : bsc.m2ua_set;
+ mtp_link_set_submit_isup_data(target, sls, msg->l3h, msgb_l3len(msg));
+}
+
void mtp_linkset_down(struct mtp_link_set *set)
{
set->available = 0;
diff --git a/src/main_udt.c b/src/main_udt.c
index f13d4dd..385f3f5 100644
--- a/src/main_udt.c
+++ b/src/main_udt.c
@@ -70,6 +70,11 @@ void mtp_link_set_forward_sccp(struct mtp_link_set *link, struct msgb *_msg, int
msc_send_direct(&bsc, _msg);
}
+void mtp_link_set_forward_isup(struct mtp_link_set *set, struct msgb *msg, int sls)
+{
+ LOGP(DINP, LOGL_ERROR, "ISUP is not handled.\n");
+}
+
void mtp_linkset_down(struct mtp_link_set *set)
{
set->available = 0;
diff --git a/src/mtp_layer3.c b/src/mtp_layer3.c
index 742da7d..6522065 100644
--- a/src/mtp_layer3.c
+++ b/src/mtp_layer3.c
@@ -495,7 +495,7 @@ int mtp_link_set_data(struct mtp_link_set *link, struct msgb *msg)
break;
case MTP_SI_MNT_ISUP:
msg->l3h = &hdr->data[0];
- rc = mtp_link_set_forward_isup(link, msg, MTP_LINK_SLS(hdr->addr));
+ rc = mtp_link_set_isup(link, msg, MTP_LINK_SLS(hdr->addr));
break;
default:
fprintf(stderr, "Unhandled: %u\n", hdr->ser_ind);
diff --git a/tests/isup/isup_parse_test.c b/tests/isup/isup_parse_test.c
index 5c3341c..d67d36d 100644
--- a/tests/isup/isup_parse_test.c
+++ b/tests/isup/isup_parse_test.c
@@ -1,6 +1,6 @@
/*
- * (C) 2010 by Holger Hans Peter Freyther <zecke@selfish.org>
- * (C) 2010 by On-Waves
+ * (C) 2010-2011 by Holger Hans Peter Freyther <zecke@selfish.org>
+ * (C) 2010-2011 by On-Waves
* All Rights Reserved
*
* This program is free software: you can redistribute it and/or modify
@@ -63,3 +63,4 @@ int main(int argc, char **argv)
/* stubs */
int mtp_link_set_submit_isup_data() {return -1;}
+int mtp_link_set_forward_isup(struct mtp_link_set *s, struct msgb *m, int l) { abort(); }