looks like this is a mistake
if(tp->switch_type == SWITCH_UNICABLE)
{
freq = send_unicable(frontend_fd, freq / 1000, diseqc, pol, hiband, tp->uslot, tp->ufreq);
}else if(tp->switch_type == SWITCH_UNICABLE)
{
freq = send_unicable(frontend_fd, freq / 1000, diseqc, pol, hiband, tp->uslot, tp->ufreq);
}