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