code being sacrificed in the course of the OmsoNITB split-up

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Neels Hofmeyr nhofmeyr at sysmocom.de
Mon Jul 24 13:35:37 UTC 2017


What about this one: I assume handover will be an entirely different issue to
be tackled with the new A-interface and we can drop this VTY command without
substitute for now?


DEFUN(ena_subscr_handover,
      ena_subscr_handover_cmd,
      "subscriber " SUBSCR_TYPES " ID handover BTS_NR",
        SUBSCR_HELP "Handover the active connection\n"
        "Number of the BTS to handover to\n")
{
#if BEFORE_MSCSPLIT
        int ret;
        struct gsm_subscriber_connection *conn;
        struct gsm_bts *bts;
        struct gsm_network *gsmnet = gsmnet_from_vty(vty);
        struct vlr_subscr *vsub =
                        get_vsub_by_argv(gsmnet, argv[0], argv[1]);

        if (!vsub) {
                vty_out(vty, "%% No subscriber found for %s %s.%s",
                        argv[0], argv[1], VTY_NEWLINE);
                return CMD_WARNING;
        }

        conn = connection_for_subscr(vsub);
        if (!conn) {
                vty_out(vty, "%% No active connection for subscriber %s %s.%s",
                        argv[0], argv[1], VTY_NEWLINE);
                vlr_subscr_put(vsub);
                return CMD_WARNING;
        }

        bts = gsm_bts_num(gsmnet, atoi(argv[2]));
        if (!bts) {
                vty_out(vty, "%% BTS with number(%d) could not be found.%s",
                        atoi(argv[2]), VTY_NEWLINE);
                vlr_subscr_put(vsub);
                return CMD_WARNING;
        }

        /* now start the handover */
        ret = bsc_handover_start(conn->lchan, bts);
        if (ret != 0) {
                vty_out(vty, "%% Handover failed with errno %d.%s",
                        ret, VTY_NEWLINE);
        } else {
                vty_out(vty, "%% Handover started from %s",
                        gsm_lchan_name(conn->lchan));
                vty_out(vty, " to %s.%s", gsm_lchan_name(conn->ho_lchan),
                        VTY_NEWLINE);
        }

        vlr_subscr_put(vsub);
        return CMD_SUCCESS;
#else
        vty_out(vty, "%% Not implemented!%s", VTY_NEWLINE);
        return -1;
#endif
}

~N
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.osmocom.org/pipermail/openbsc/attachments/20170724/0be42bc5/attachment.bin>


More information about the OpenBSC mailing list