mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-11-02 21:13:44 +00:00
Compare commits
9 Commits
on-waves/0
...
on-waves/0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ce701d7c5f | ||
|
|
f3759a4934 | ||
|
|
5bfb9102af | ||
|
|
2300d69df6 | ||
|
|
c67cd2e11a | ||
|
|
2afb915758 | ||
|
|
dbac9295e7 | ||
|
|
9f972a5fb0 | ||
|
|
33f3dcbbca |
@@ -1,5 +1,5 @@
|
||||
dnl Process this file with autoconf to produce a configure script
|
||||
AC_INIT(openbsc, 0.3.99.15onwaves)
|
||||
AC_INIT(openbsc, 0.3.99.16onwaves)
|
||||
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
|
||||
|
||||
dnl kernel style compile messages
|
||||
@@ -15,7 +15,7 @@ dnl checks for libraries
|
||||
AC_SEARCH_LIBS(crypt, crypt,
|
||||
[LIBCRYPT="-lcrypt"; AC_DEFINE([VTY_CRYPT_PW], [], [Use crypt functionality of vty.])])
|
||||
|
||||
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.1.7)
|
||||
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.1.11)
|
||||
|
||||
dnl checks for header files
|
||||
AC_HEADER_STDC
|
||||
|
||||
@@ -218,6 +218,7 @@ struct gsm_subscriber_connection {
|
||||
|
||||
/* use count. how many users use this channel */
|
||||
unsigned int use_count;
|
||||
int hand_off;
|
||||
|
||||
/* Are we part of a special "silent" call */
|
||||
int silent_call;
|
||||
|
||||
@@ -1044,8 +1044,8 @@ static int bootstrap_bts(struct gsm_bts *bts)
|
||||
}
|
||||
|
||||
/* some defaults for our system information */
|
||||
bts->si_common.cell_options.radio_link_timeout = 2; /* 12 */
|
||||
bts->si_common.cell_options.dtx = 2; /* MS shall not use upplink DTX */
|
||||
bts->si_common.cell_options.radio_link_timeout = 7; /* 12 */
|
||||
bts->si_common.cell_options.dtx = 0; /* MS may use upplink DTX */
|
||||
bts->si_common.cell_options.pwrc = 0; /* PWRC not set */
|
||||
|
||||
bts->si_common.cell_sel_par.acs = 0;
|
||||
|
||||
@@ -136,12 +136,14 @@ static void bss_close_lchans(struct bss_sccp_connection_data *bss)
|
||||
{
|
||||
if (bss->lchan) {
|
||||
bss->lchan->msc_data = NULL;
|
||||
bss->lchan->conn.hand_off += 1;
|
||||
put_subscr_con(&bss->lchan->conn, 0);
|
||||
bss->lchan = NULL;
|
||||
}
|
||||
|
||||
if (bss->secondary_lchan) {
|
||||
bss->secondary_lchan->msc_data = NULL;
|
||||
bss->secondary_lchan->conn.hand_off += 1;
|
||||
put_subscr_con(&bss->secondary_lchan->conn, 0);
|
||||
bss->secondary_lchan = NULL;
|
||||
}
|
||||
@@ -422,12 +424,14 @@ static int handle_ass_compl(struct msgb *msg)
|
||||
|
||||
if (!msg->lchan->msc_data) {
|
||||
LOGP(DMSC, LOGL_ERROR, "No MSC data\n");
|
||||
msg->lchan->conn.hand_off += 1;
|
||||
put_subscr_con(&msg->lchan->conn, 0);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (msg->lchan->msc_data->secondary_lchan != msg->lchan) {
|
||||
LOGP(DMSC, LOGL_ERROR, "Wrong assignment complete.\n");
|
||||
msg->lchan->conn.hand_off += 1;
|
||||
put_subscr_con(&msg->lchan->conn, 0);
|
||||
return -1;
|
||||
}
|
||||
@@ -435,6 +439,7 @@ static int handle_ass_compl(struct msgb *msg)
|
||||
if (msgb_l3len(msg) - sizeof(*gh) != 1) {
|
||||
LOGP(DMSC, LOGL_ERROR, "assignment compl invalid: %d\n",
|
||||
msgb_l3len(msg) - sizeof(*gh));
|
||||
msg->lchan->conn.hand_off += 1;
|
||||
put_subscr_con(&msg->lchan->conn, 0);
|
||||
return -1;
|
||||
}
|
||||
@@ -453,6 +458,7 @@ static int handle_ass_compl(struct msgb *msg)
|
||||
if (old_chan->conn.subscr)
|
||||
subscr_put(old_chan->conn.subscr);
|
||||
old_chan->conn.subscr = NULL;
|
||||
old_chan->conn.hand_off += 1;
|
||||
put_subscr_con(&old_chan->conn, 1);
|
||||
}
|
||||
|
||||
@@ -476,6 +482,7 @@ static int handle_ass_fail(struct msgb *msg)
|
||||
LOGP(DMSC, LOGL_ERROR, "ASSIGNMENT FAILURE from MS, forwarding to MSC\n");
|
||||
if (!msg->lchan->msc_data) {
|
||||
LOGP(DMSC, LOGL_ERROR, "No MSC data\n");
|
||||
msg->lchan->conn.hand_off += 1;
|
||||
put_subscr_con(&msg->lchan->conn, 0);
|
||||
return -1;
|
||||
}
|
||||
@@ -484,6 +491,7 @@ static int handle_ass_fail(struct msgb *msg)
|
||||
if (msg->lchan->msc_data->lchan != msg->lchan) {
|
||||
LOGP(DMSC, LOGL_NOTICE, "Failure should come on the old link.\n");
|
||||
msg->lchan->msc_data = NULL;
|
||||
msg->lchan->conn.hand_off += 1;
|
||||
put_subscr_con(&msg->lchan->conn, 0);
|
||||
return -1;
|
||||
}
|
||||
@@ -612,6 +620,7 @@ int gsm0408_rcvmsg(struct msgb *msg, u_int8_t link_id)
|
||||
} else if (rc <= 0 && !msg->lchan->msc_data && msg->lchan->conn.use_count == 0) {
|
||||
if (msg->lchan->state == LCHAN_S_ACTIVE) {
|
||||
LOGP(DMSC, LOGL_NOTICE, "Closing unowned channel.\n");
|
||||
msg->lchan->conn.hand_off += 1;
|
||||
use_subscr_con(&msg->lchan->conn);
|
||||
put_subscr_con(&msg->lchan->conn, 0);
|
||||
}
|
||||
|
||||
@@ -170,6 +170,7 @@ static int bssmap_handle_clear_command(struct sccp_connection *conn,
|
||||
bssmap_free_secondary(msg->lchan->msc_data);
|
||||
|
||||
msg->lchan->msc_data = NULL;
|
||||
msg->lchan->conn.hand_off += 1;
|
||||
put_subscr_con(&msg->lchan->conn, 0);
|
||||
}
|
||||
|
||||
@@ -294,6 +295,7 @@ static void bssmap_free_secondary(struct bss_sccp_connection_data *data)
|
||||
if (lchan->conn.subscr)
|
||||
subscr_put(lchan->conn.subscr);
|
||||
lchan->conn.subscr = NULL;
|
||||
lchan->conn.hand_off += 1;
|
||||
put_subscr_con(&lchan->conn, 1);
|
||||
}
|
||||
|
||||
@@ -451,6 +453,7 @@ static void continue_new_assignment(struct gsm_lchan *new_lchan)
|
||||
{
|
||||
if (!new_lchan->msc_data) {
|
||||
LOGP(DMSC, LOGL_ERROR, "No BSS data found.\n");
|
||||
new_lchan->conn.hand_off += 1;
|
||||
put_subscr_con(&new_lchan->conn, 0);
|
||||
return;
|
||||
}
|
||||
@@ -458,6 +461,7 @@ static void continue_new_assignment(struct gsm_lchan *new_lchan)
|
||||
if (new_lchan->msc_data->secondary_lchan != new_lchan) {
|
||||
LOGP(DMSC, LOGL_ERROR, "This is not the secondary channel?\n");
|
||||
new_lchan->msc_data = NULL;
|
||||
new_lchan->conn.hand_off += 1;
|
||||
put_subscr_con(&new_lchan->conn, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -426,11 +426,11 @@ int rsl_lchan_rll_release(struct gsm_lchan *lchan, u_int8_t link_id)
|
||||
int _lchan_release(struct gsm_lchan *lchan, u_int8_t release_reason)
|
||||
{
|
||||
if (lchan->conn.use_count > 0) {
|
||||
DEBUGP(DRLL, "BUG: _lchan_release called without zero use_count.\n");
|
||||
LOGP(DRLL, LOGL_ERROR, "BUG: _lchan_release called without zero use_count.\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
DEBUGP(DRLL, "%s Recycling Channel\n", gsm_lchan_name(lchan));
|
||||
LOGP(DRLL, LOGL_NOTICE, "%s Recycling Channel.\n", gsm_lchan_name(lchan));
|
||||
rsl_lchan_set_state(lchan, LCHAN_S_REL_REQ);
|
||||
lchan->release_reason = release_reason;
|
||||
_lchan_handle_release(lchan);
|
||||
|
||||
@@ -451,7 +451,8 @@ static int generate_si13(u_int8_t *output, struct gsm_bts *bts)
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
si13->header.l2_plen = ret & 0xff;
|
||||
/* length is coded in bit 2 an up */
|
||||
si13->header.l2_plen = 0x01;
|
||||
|
||||
return sizeof (*si13) + ret;
|
||||
}
|
||||
|
||||
@@ -779,6 +779,19 @@ static void lchan_dump_short_vty(struct vty *vty, struct gsm_lchan *lchan)
|
||||
VTY_NEWLINE);
|
||||
}
|
||||
|
||||
static void lchan_dump_status_vty(struct vty *vty, struct gsm_lchan *lchan)
|
||||
{
|
||||
vty_out(vty, "Lchan: %u/%u/%u/%u Type: %s State: %s ref: %u HO: %d Subscriber: %d "
|
||||
"Time: %lu SAPI: %d/%d%s",
|
||||
lchan->nr, lchan->ts->nr, lchan->ts->trx->nr,
|
||||
lchan->ts->trx->bts->nr, gsm_lchant_name(lchan->type),
|
||||
gsm_lchans_name(lchan->state), lchan->conn.use_count,
|
||||
lchan->conn.hand_off,
|
||||
lchan->conn.subscr != NULL, (unsigned long) lchan->alloc_time.tv_sec,
|
||||
lchan->sapis[0], lchan->sapis[3],
|
||||
VTY_NEWLINE);
|
||||
}
|
||||
|
||||
static int lchan_summary(struct vty *vty, int argc, const char **argv,
|
||||
void (*dump_cb)(struct vty *, struct gsm_lchan *))
|
||||
{
|
||||
@@ -859,12 +872,20 @@ DEFUN(show_lchan,
|
||||
|
||||
DEFUN(show_lchan_summary,
|
||||
show_lchan_summary_cmd,
|
||||
"show lchan summary [bts_nr] [trx_nr] [ts_nr] [lchan_nr]",
|
||||
"show lchan-summary [bts_nr] [trx_nr] [ts_nr] [lchan_nr]",
|
||||
SHOW_STR "Display a short summary about a logical channel\n")
|
||||
{
|
||||
return lchan_summary(vty, argc, argv, lchan_dump_short_vty);
|
||||
}
|
||||
|
||||
DEFUN(show_lchan_status,
|
||||
show_lchan_status_cmd,
|
||||
"show lchan-status [bts_nr] [trx_nr] [ts_nr] [lchan_nr]",
|
||||
SHOW_STR "Display a short stat about a logical channel\n")
|
||||
{
|
||||
return lchan_summary(vty, argc, argv, lchan_dump_status_vty);
|
||||
}
|
||||
|
||||
static void e1drv_dump_vty(struct vty *vty, struct e1inp_driver *drv)
|
||||
{
|
||||
vty_out(vty, "E1 Input Driver %s%s", drv->name, VTY_NEWLINE);
|
||||
@@ -2171,6 +2192,7 @@ int bsc_vty_init(struct gsm_network *net)
|
||||
install_element(VIEW_NODE, &show_ts_cmd);
|
||||
install_element(VIEW_NODE, &show_lchan_cmd);
|
||||
install_element(VIEW_NODE, &show_lchan_summary_cmd);
|
||||
install_element(VIEW_NODE, &show_lchan_status_cmd);
|
||||
|
||||
install_element(VIEW_NODE, &show_e1drv_cmd);
|
||||
install_element(VIEW_NODE, &show_e1line_cmd);
|
||||
|
||||
Reference in New Issue
Block a user