* *************************************************************************/
static int
-linuxdvb_external_command
+linuxdvb_rotor_extcmd
(linuxdvb_rotor_t *lr, linuxdvb_satconf_t *ls)
{
int outlen = -1, rd = -1;
int ret = -1;
snprintf(num, sizeof(num), "%u", lr->lr_position);
- if (spawn_and_give_stdout(ls->ls_external_cmd, argv, NULL, &rd, NULL, 1) >= 0) {
+ if (spawn_and_give_stdout(ls->ls_rotor_extcmd, argv, NULL, &rd, NULL, 1) >= 0) {
outlen = read(rd, outbuf, 99);
if (outlen>0) {
outbuf[outlen]=0;
}
if (rd>=0)
close(rd);
- tvhinfo(LS_DISEQC, "linuxdvb_external_command moving to %d returned %d", lr->lr_position, ret);
+ tvhinfo(LS_DISEQC, "linuxdvb_rotor_extcmd moving to %d returned %d", lr->lr_position, ret);
return ret;
}
linuxdvb_external_grace
( linuxdvb_rotor_t *lr, linuxdvb_satconf_t *ls)
{
- int ret=linuxdvb_external_command(lr, ls);
+ int ret = linuxdvb_rotor_extcmd(lr, ls);
if (ret<0)
return ls->ls_max_rotor_move;
return ret;
int newpos, delta, tunit, min, res;
if (idnode_is_instance(&lr->ld_id, &linuxdvb_rotor_external_class))
- return linuxdvb_external_grace(lr, ls);
+ return linuxdvb_external_grace(lr, ls);
if (!ls->ls_last_orbital_pos || ls->ls_motor_rate == 0)
return ls->ls_max_rotor_move;
( linuxdvb_rotor_t *lr, dvb_mux_t *lm,
linuxdvb_satconf_t *lsp, linuxdvb_satconf_ele_t *ls )
{
- return linuxdvb_external_command(lr, lsp);
+ return linuxdvb_rotor_extcmd(lr, lsp);
}
/* USALS */
{
.type = PT_STR,
.id = "external_cmd",
- .name = N_("External command"),
- .desc = N_("Command to move the dish with rotor external."),
- .off = offsetof(linuxdvb_satconf_t, ls_external_cmd),
+ .name = N_("External rotor command"),
+ .desc = N_("Command to move the dish with an external command."),
+ .off = offsetof(linuxdvb_satconf_t, ls_rotor_extcmd),
.opts = PO_ADVANCED,
.def.i = 0
},
}
idnode_save_check(&ls->ls_id, 1);
idnode_unlink(&ls->ls_id);
+ free(ls->ls_rotor_extcmd);
free(ls);
}