}
if (epnum.e_num) {
htsmsg_add_u32(m, "episodeNumber", epnum.e_num);
- if (epnum.s_cnt)
+ if (epnum.e_cnt)
htsmsg_add_u32(m, "episodeCount", epnum.e_cnt);
}
if (epnum.p_num) {
const int index = capmt->capmt_last_key.index;
const int parity = capmt->capmt_last_key.parity;
const uint8_t *cw = capmt->capmt_last_key.cw;
- ca_info_t *cai = &capmt->capmt_adapters[adapter].ca_info[index];
+ ca_info_t *cai;
int type;
capmt->capmt_last_key.adapter = -1;
if (adapter < 0)
return;
+ cai = &capmt->capmt_adapters[adapter].ca_info[index];
switch (cai->algo) {
case CA_ALGO_DVBCSA:
type = DESCRAMBLER_CSA_CBC;
la = (linuxdvb_adapter_t*)is->is_array[i];
if (!la || !la->la_is_enabled(la)) continue;
n = la->la_dvb_number;
- if (n < 0 || n > MAX_CA) {
+ if (n < 0 || n >= MAX_CA) {
tvherror(LS_CAPMT, "%s: adapter number > MAX_CA", capmt_name(capmt));
continue;
}
&capmt->capmt_adapters[n].ca_sock,
capmt->capmt_port + n);
}
+ idnode_set_free(is);
if (bind_ok)
handle_ca0(capmt);
}
}
+ pthread_mutex_lock(&t->s_stream_mutex);
((mpegts_service_t *)t)->s_dvb_mux->mm_descrambler_flush = 0;
if (t->s_descramble == NULL) {
t->s_descramble = dr = calloc(1, sizeof(th_descrambler_runtime_t));
if (t->s_dvb_forcecaid == 0xffff)
dr->dr_descramble = descrambler_pass;
}
+ pthread_mutex_unlock(&t->s_stream_mutex);
if (t->s_dvb_forcecaid != 0xffff)
caclient_start(t);
}
if (ac == NULL) {
if ((ac = calloc(1, sizeof(*ac))) == NULL)
- return;
+ goto reterr;
ac->ca = lca;
}
if (ac_first == NULL)
dvbcam_status_update();
+reterr:
pthread_mutex_unlock(&dvbcam_mutex);
}
if (data[0] == 0x82) {
if (len >= 10) {
PROVIDERS_FOREACH(ra, i, ep)
- if (memcmp(&data[3], &ep->sa[1], 7) == 0)
+ if (memcmp(&data[3], &ep->sa[1], 7) == 0) {
+ match = 1;
break;
+ }
}
}
if (match)
size_t l;
int i;
if (weekdays == 0x7f)
- strcpy(buf + 1, tvh_gettext_lang(lang, N_("Every day")));
+ snprintf(buf, sizeof(buf), "%s", tvh_gettext_lang(lang, N_("Every day")));
else if (weekdays == 0)
- strcpy(buf + 1, tvh_gettext_lang(lang, N_("No days")));
+ snprintf(buf, sizeof(buf), "%s", tvh_gettext_lang(lang, N_("No days")));
else {
buf[0] = '\0';
for (i = 0; i < 7; i++)
{
dvr_autorec_entry_t *dae = (dvr_autorec_entry_t *)o;
const uint16_t *val = (uint16_t*)v;
- if (*val < 0 || *val > 100)
+ if (*val > 100)
return 0;
dae->dae_star_rating = *val;
return 1;
* So reverse slash would find the char at id+12 so +1 for len
* to include the slash itself.
*/
- const char *slash = strchr(progid1, '/');
- const ssize_t num_char = slash ? slash + 1 - progid1 : 0;
- is_same_authority = !strncmp(progid1, progid2, num_char);
+ if (progid1 && progid2) {
+ const char *slash = strchr(progid1, '/');
+ const ssize_t num_char = slash ? slash + 1 - progid1 : 0;
+ is_same_authority = !strncmp(progid1, progid2, num_char);
+ } else {
+ is_same_authority = 0;
+ }
}
const int do_progid_check =
subtitle = NULL;
}
- char *title_buf = title ? alloca(strlen(title) + 1) : NULL;
- char *subtitle_buf = subtitle ? alloca(strlen(subtitle) + 1) : NULL;
+ const size_t title_buf_size = title ? strlen(title) + 1 : 0;
+ char *title_buf = title ? alloca(title_buf_size) : NULL;
+ const size_t subtitle_buf_size = title ? strlen(title) + 1 : 0;
+ char *subtitle_buf = subtitle ? alloca(subtitle_buf_size) : NULL;
/* Copy a cleaned version in to our buffers.
* Since dvr_clean_directory_separator _can_ modify source if source!=dest
* it means we have to remove our const when we call it.
*/
if (title)
- dvr_clean_directory_separator((char*)title, title_buf, sizeof(title_buf));
+ dvr_clean_directory_separator((char*)title, title_buf, title_buf_size);
if (subtitle)
- dvr_clean_directory_separator((char*)subtitle, subtitle_buf, sizeof(subtitle_buf));
+ dvr_clean_directory_separator((char*)subtitle, subtitle_buf, subtitle_buf_size);
int is_movie = 0;
/* Override options on the format tag. This is useful because my OTA
void epg_episode_get_epnum ( const epg_episode_t *ee, epg_episode_num_t *num )
{
if (!ee || !num) {
- memset(num, 0, sizeof(*num));
+ if (num)
+ memset(num, 0, sizeof(*num));
return;
}
*num = ee->epnum;
epggrab_module_ext_t *mod = (epggrab_module_ext_t*)p;
tvhinfo(mod->subsys, "%s: external socket enabled", mod->id);
- while ( mod->enabled && (s1 = atomic_get(&mod->sock)) ) {
+ while (mod->enabled && (s1 = atomic_get(&mod->sock)) >= 0) {
tvhdebug(mod->subsys, "%s: waiting for connection", mod->id);
s = accept(s1, NULL, NULL);
- if (s <= 0) continue;
+ if (s < 0) continue;
tvhdebug(mod->subsys, "%s: got connection %d", mod->id, s);
_epggrab_socket_handler(mod, s);
close(s);
assert(mod->type == EPGGRAB_EXT);
mod->active = 0;
- sock = atomic_exchange(&mod->sock, 0);
+ sock = atomic_exchange(&mod->sock, -1);
shutdown(sock, SHUT_RDWR);
close(sock);
if (mod->tid) {
epggrab_module_ext_t *mod = (epggrab_module_ext_t*)m;
const char *path;
assert(mod->type == EPGGRAB_EXT);
+ int sock;
/* Ignore */
- if ( mod->active == a ) return 0;
+ if (mod->active == a) return 0;
/* Disable */
if (!a) {
unlink(mod->path); // just in case!
hts_settings_makedirs(mod->path);
- atomic_set(&mod->sock, socket(AF_UNIX, SOCK_STREAM, 0));
- assert(atomic_get(&mod->sock));
+ sock = socket(AF_UNIX, SOCK_STREAM, 0);
+ assert(sock >= 0);
memset(&addr, 0, sizeof(struct sockaddr_un));
addr.sun_family = AF_UNIX;
strncpy(addr.sun_path, mod->path, 100);
- if ( bind(mod->sock, (struct sockaddr*)&addr,
- sizeof(struct sockaddr_un)) != 0 ) {
- tvherror(mod->subsys, "%s: failed to bind socket", mod->id);
- close(mod->sock);
- mod->sock = 0;
+ if (bind(sock, (struct sockaddr*)&addr,
+ sizeof(struct sockaddr_un)) != 0) {
+ tvherror(mod->subsys, "%s: failed to bind socket: %s", mod->id, strerror(errno));
+ close(sock);
return 0;
}
- if ( listen(mod->sock, 5) != 0 ) {
- tvherror(mod->subsys, "%s: failed to listen on socket", mod->id);
- close(mod->sock);
- mod->sock = 0;
+ if (listen(mod->sock, 5) != 0) {
+ tvherror(mod->subsys, "%s: failed to listen on socket: %s", mod->id, strerror(errno));
+ close(sock);
return 0;
}
tvhdebug(mod->subsys, "%s: starting socket thread", mod->id);
pthread_attr_init(&tattr);
mod->active = 1;
+ atomic_set(&mod->sock, sock);
tvhthread_create(&mod->tid, &tattr, _epggrab_socket_thread, mod, "epggrabso");
}
return 1;
/* Allocate data */
if (!skel) skel = calloc(1, sizeof(epggrab_module_ext_t));
+ atomic_set(&skel->sock, -1);
/* Pass through */
hts_settings_buildpath(path, sizeof(path), "epggrab/%s.sock", sockid);
p[1] = 0x80 | (len >> 7);
p[2] = len & 0x7f;
return p + 3;
- p += 2;
} else if (len < 0x10000000) {
p[0] = 0x80 | (len >> 21);
p[1] = 0x80 | (len >> 14);
htsmsg_add_str(out, "method", method);
htsmsg_add_u32(out, "eventId", e->id);
- htsmsg_add_u32(out, "channelId", channel_get_id(e->channel));
+ if (e->channel)
+ htsmsg_add_u32(out, "channelId", channel_get_id(e->channel));
htsmsg_add_s64(out, "start", e->start);
htsmsg_add_s64(out, "stop", e->stop);
if ((str = epg_broadcast_get_title(e, lang)))
if (caid == 0x4ad2)//streamguard
provid=0;
if (caid != 0x4aee && caid != 0x4ad2) { // Bulcrypt
- provid = size < 4 ? 0 : buffer[4];
+ provid = size < 5 ? 0 : buffer[4];
}
break;
case 0x1800: // Nagra
case 0x06:
/* 0x06 is Chinese Cable TV AC-3 audio track */
/* but mark it so only when no more descriptors exist */
- if (dllen > 1 || !mux || mux->mm_pmt_ac3 != MM_AC3_PMT_06)
+ if (dllen > 1 || mux->mm_pmt_ac3 != MM_AC3_PMT_06)
break;
/* fall through to SCT_AC3 */
case 0x81:
case DVB_DESC_APP:
l3 = *dptr++; dlen--;
if (l3 % 5) goto dvberr;
- while (l3 >= 5) {
+ while (dlen >= 5 && l3 >= 5) {
tvhtrace(mt->mt_subsys, "%s: profile %04X %d.%d.%d", mt->mt_name, (dptr[0] << 8) | dptr[1], dptr[2], dptr[3], dptr[4]);
dptr += 5;
dlen -= 5;
htsmsg_add_msg(apps, NULL, map);
} else {
htsmsg_destroy(titles);
+ titles = NULL;
}
}
if (l2 != 0)
if (prop == NULL)
tvherror(LS_EN50221, "%s: unknown resource id %08x",
cil->cil_name, resource_id);
- app = calloc(1, prop->ciap_struct_size);
+ app = calloc(1, prop ? prop->ciap_struct_size : 0);
if (app == NULL)
return -ENOMEM;
snprintf(buf, sizeof(buf), "%s-app%08x/%04X", cil->cil_name,
if (CICAM_CA_ENABLE(p[2]) != CICAM_CAEI_POSSIBLE)
app->cia_ca_possible = 1;
tvh_strlcatf(buf, sizeof(buf), c, " %d=%02X", u16, p[2]);
+ i -= 3;
}
}
}
tl -= 2 + dlen;
}
if (l)
- return -EINVAL;
+ goto reterr;
y[3] = 0xf0;
put_len12(y + 3, x - y - 5);
} else {
}
}
- *capmt = d;
- *capmtlen = x - d;
- return 0;
+ if (tl == 0) {
+ *capmt = d;
+ *capmtlen = x - d;
+ return 0;
+ }
reterr:
free(d);
while (tl >= 5) {
l = extract_len12(n + 3);
if (l + 5 > tl)
- return -EINVAL;
+ goto reterr;
if (l > 0) {
if (l < 7)
goto reterr;
n += 5 + l;
tl -= 5 + l;
}
- if (tl)
- return -EINVAL;
- *dst = d;
- *dstlen = capmtlen;
- return 0;
+
+ if (tl == 0) {
+ *dst = d;
+ *dstlen = capmtlen;
+ return 0;
+ }
reterr:
free(d);
pthread_mutex_lock(&iptv_lock);
s = im->mm_iptv_url_raw;
im->mm_iptv_url_raw = strdup(raw);
- im->mm_active = mmi; // Note: must set here else mux_started call
- // will not realise we're ready to accept pid open calls
- ret = ih->start(im, im->mm_iptv_url_raw, &url);
- if (!ret)
- im->im_handler = ih;
- else
- im->mm_active = NULL;
+ if (im->mm_iptv_url_raw) {
+ im->mm_active = mmi; // Note: must set here else mux_started call
+ // will not realise we're ready to accept pid open calls
+ ret = ih->start(im, im->mm_iptv_url_raw, &url);
+ if (!ret)
+ im->im_handler = ih;
+ else
+ im->mm_active = NULL;
+ }
pthread_mutex_unlock(&iptv_lock);
urlreset(&url);
m = parse_m3u(data, in->in_ctx_charset, host_url);
items = htsmsg_get_list(m, "items");
- HTSMSG_FOREACH(f, items) {
- if ((item = htsmsg_field_get_map(f)) == NULL) continue;
- iptv_auto_network_process_m3u_item(in, last_url,
- remove_args, ignore_args, ignore_path,
- chnum, item, &total, &count);
-
+ if (items) {
+ HTSMSG_FOREACH(f, items) {
+ if ((item = htsmsg_field_get_map(f)) == NULL) continue;
+ iptv_auto_network_process_m3u_item(in, last_url,
+ remove_args, ignore_args, ignore_path,
+ chnum, item, &total, &count);
+
+ }
}
htsmsg_destroy(m);
if (total == 0)
}
memcpy(hp->hls_aes128.tmp + hp->hls_aes128.tmp_len, buf, len);
hp->hls_aes128.tmp_len += len;
- if (off == im->mm_iptv_buffer.sb_ptr)
+ if (off == im->mm_iptv_buffer.sb_ptr) {
+ pthread_mutex_unlock(&iptv_lock);
return 0;
+ }
buf = im->mm_iptv_buffer.sb_data + im->mm_iptv_buffer.sb_ptr;
len = im->mm_iptv_buffer.sb_ptr - off;
assert((len % 16) == 0);
{
iptv_libav_priv_t *la = calloc(1, sizeof(*la));
+ assert(raw);
pthread_mutex_init(&la->lock, NULL);
im->im_opaque = la;
if (strncmp(raw, "libav:", 6) == 0)
atomic_set(&la->pause, 0);
sbuf_init(&la->sbuf);
tvhthread_create(&la->thread, NULL, iptv_libav_thread, la, "libavinput");
- if (raw && raw[0])
+ if (raw[0])
iptv_input_mux_started(im);
return 0;
}
htsmsg_add_u32(conf, "sid", in->in_service_id);
htsmsg_add_u32(conf, "dvb_servicetype", 1); /* SDTV */
ms = iptv_service_create0(im, 0, 0, NULL, conf);
- ms->s_pmt_pid = SERVICE_PMT_AUTO;
htsmsg_destroy(conf);
- if (ms)
+ if (ms) {
+ ms->s_pmt_pid = SERVICE_PMT_AUTO;
mpegts_network_bouquet_trigger((mpegts_network_t *)in, 0);
+ }
}
htsmsg_destroy(c2);
tvhtrace(LS_EN50221, "ca thread start");
ev = malloc(sizeof(*ev) * evsize);
- poll = tvhpoll_create(ARRAY_SIZE(ev) + 1);
+ poll = tvhpoll_create(evsize + 1);
tm = mclk();
waitms = 250;
while (tvheadend_running && !quit) {
if (!linuxdvb_ca_write_cmd(lca, CA_WRITE_CMD_CAPMT_QUERY, capmt2, capmtlen2)) {
tvhtrace(LS_EN50221, "%s: CAPMT enqueued query (len %zd)", lca->lca_name, capmtlen2);
en50221_capmt_dump(LS_EN50221, lca->lca_name, capmt2, capmtlen2);
- free(capmt2);
}
+ free(capmt2);
}
if (!linuxdvb_ca_write_cmd(lca, CA_WRITE_CMD_CAPMT, capmt, capmtlen)) {
sigstat.tc_bit = mmi->tii_stats.tc_bit;
sigstat.ec_block = mmi->tii_stats.ec_block;
sigstat.tc_block = mmi->tii_stats.tc_block;
+ memset(&sm, 0, sizeof(sm));
sm.sm_type = SMT_SIGNAL_STATUS;
sm.sm_data = &sigstat;
htsmsg_t *scconf;
ssize_t r;
+ /* Internal config ID */
+ snprintf(id, sizeof(id), "%s #%d", dvb_type2str(type), number);
+ if (conf)
+ conf = htsmsg_get_map(conf, id);
+ if (conf)
+ uuid = htsmsg_get_str(conf, "uuid");
+
/* Tuner slave */
snprintf(id, sizeof(id), "master for #%d", number);
if (conf && type == DVB_TYPE_S) {
muuid = NULL;
}
- /* Internal config ID */
- snprintf(id, sizeof(id), "%s #%d", dvb_type2str(type), number);
- if (conf)
- conf = htsmsg_get_map(conf, id);
- if (conf)
- uuid = htsmsg_get_str(conf, "uuid");
-
/* Fudge configuration for old network entry */
if (conf) {
if (!htsmsg_get_list(conf, "networks") &&
htsmsg_t *linuxdvb_en50494_pin_list ( void *o, const char *lang );
static inline int linuxdvb_unicable_is_en50607( const char *str )
- { return strcmp(str, UNICABLE_II_NAME) == 0; }
+ { return str && strcmp(str, UNICABLE_II_NAME) == 0; }
static inline int linuxdvb_unicable_is_en50494( const char *str )
{ return !linuxdvb_unicable_is_en50607(str); }
for (i = 0; i < len; i++) {
message.msg[i] = (uint8_t)va_arg(ap, int);
if (tvhtrace_enabled())
- tvh_strlcatf(buf, sizeof(buf), c, "%02X ", message.msg[3 + i]);
+ tvh_strlcatf(buf, sizeof(buf), c, "%02X ", message.msg[i]);
}
va_end(ap);
pthread_mutex_lock(&t->s_stream_mutex);
x = t->s_pids;
t->s_pids = p;
- if (!pids->all && x && x->all) {
+ if (pids && !pids->all && x && x->all) {
mpegts_input_close_pid(mi, mm, MPEGTS_FULLMUX_PID, MPS_RAW, MPS_WEIGHT_RAW, t);
mpegts_input_close_pids(mi, mm, t, 1);
for (i = 0; i < x->count; i++) {
mpegts_input_open_pid(mi, mm, pi->pid, MPS_RAW, pi->weight, t, 0);
}
} else {
- if (pids->all) {
+ if (pids && pids->all) {
mpegts_input_close_pids(mi, mm, t, 1);
mpegts_input_open_pid(mi, mm, MPEGTS_FULLMUX_PID, MPS_RAW, MPS_WEIGHT_RAW, t, 0);
} else {
sigstat.ec_block = mmi->tii_stats.ec_block;
sigstat.tc_block = mmi->tii_stats.tc_block;
pthread_mutex_unlock(&mmi->tii_stats_mutex);
+ memset(&sm, 0, sizeof(sm));
sm.sm_type = SMT_SIGNAL_STATUS;
sm.sm_data = &sigstat;
LIST_FOREACH(svc, &mmi->mmi_mux->mm_transports, s_active_link) {
udp_multirecv_free(&um);
lfe->sf_curmux = NULL;
- memset(ev, 0, sizeof(&ev));
+ memset(ev, 0, sizeof(ev));
nfds = 0;
if ((rtsp_flags & SATIP_SETUP_TCP) == 0) {
ev[nfds++].fd = rtp->fd;
pb = pktbuf_alloc(sb->sb_data, sb->sb_ptr);
pb->pb_err = sb->sb_err;
+ memset(&sm, 0, sizeof(sm));
sm.sm_type = SMT_MPEGTS;
sm.sm_data = pb;
streaming_service_deliver((service_t *)t, streaming_msg_clone(&sm));
pthread_mutex_unlock(&hfe->hf_hdhomerun_device_mutex);
if(r < 1) {
tvherror(LS_TVHDHOMERUN, "failed to set target: %d", r);
+ close(sockfd);
return NULL;
}
sigstat.signal_scale = mmi->tii_stats.signal_scale = SIGNAL_STATUS_SCALE_RELATIVE;
sigstat.ber = mmi->tii_stats.ber;
sigstat.unc = atomic_get(&mmi->tii_stats.unc);
+ memset(&sm, 0, sizeof(sm));
sm.sm_type = SMT_SIGNAL_STATUS;
sm.sm_data = &sigstat;
class_name = ptr && *(void **)ptr ? av_default_item_name(ptr) : "";
+ if (fmt == NULL)
+ return;
+
l1 = strlen(fmt);
l2 = strlen(class_name);
fmt1 = alloca(l1 + l2 + 3);
- if (fmt == NULL)
- return;
strcpy(fmt1, class_name);
if (class_name[0])
data = until_eol(data + 14);
continue;
} else if (strncmp(data, "#EXTVLCOPT:program=", 19) == 0) {
+ if (item == NULL)
+ item = htsmsg_create_map();
htsmsg_add_s64(item, "vlc-program", strtoll(data + 19, NULL, 10));
data = until_eol(data + 19);
} else if (strncmp(data, "#EXT", 4) == 0) {
}
if (strcmp(rs->peer_ipstr, ipstr) == 0 && --count_u == 0) {
tvhnotice(LS_SATIPS, "Max number (%i) of active RTSP sessions per user (IP: %s).",
- satip_server_conf.satip_max_user_connections, strdup(ipstr));
+ satip_server_conf.satip_max_user_connections, ipstr);
return NULL;
}
}
used_port = rtsp_nat_port;
}
- if (used_ip[0] == '*' || used_ip[0] == '\0' || used_ip == NULL) {
+ if (used_ip == NULL || used_ip[0] == '*' || used_ip[0] == '\0') {
if (local) {
tcp_get_str_from_ip(hc->hc_local_ip, buf, buflen);
used_ip = buf;
rtsp_manage_descramble(session_t *rs)
{
idnode_set_t *found;
- mpegts_service_t *s, *snext;
- mpegts_service_t *master = (mpegts_service_t *)rs->subs->ths_raw_service;
+ mpegts_service_t *s, *snext, *master;
slave_subscription_t *sub;
mpegts_apids_t pmt_pids;
size_t si;
if (rs->mux == NULL || rs->subs == NULL)
goto end;
+ master = (mpegts_service_t *)rs->subs->ths_raw_service;
+
if (rs->pids.all) {
LIST_FOREACH(s, &rs->mux->mm_services, s_dvb_mux_link)
if (rtsp_validate_service(s, NULL))
// might have been spawned
setpgid(p, p);
}
+ // do not pass the local variable outside
+ if (argv[0] == bin)
+ argv[0] = NULL;
return 0;
}
if (pid)
*pid = p;
+ // do not pass the local variable outside
+ if (argv[0] == bin)
+ argv[0] = NULL;
return 0;
}
if (self->helper && self->helper->pack) {
pkt = self->helper->pack(self, avpkt);
- }
- else {
+ } else {
pkt = pkt_alloc(self->stream->type, avpkt->data, avpkt->size, avpkt->pts, avpkt->dts, 0);
}
if (!pkt) {
tvh_context_log(self, LOG_ERR, "failed to create packet");
+ } else {
+ // FIXME: ugly hack
+ if (pkt->pkt_pcr == 0)
+ pkt->pkt_pcr = pkt->pkt_dts;
+ if (_context_meta(self, avpkt, pkt) || _context_wrap(self, avpkt, pkt))
+ TVHPKT_CLEAR(pkt);
}
- else if (_context_meta(self, avpkt, pkt) ||
- _context_wrap(self, avpkt, pkt)) {
- TVHPKT_CLEAR(pkt);
- }
- // FIXME: ugly hack
- if (pkt->pkt_pcr == 0)
- pkt->pkt_pcr = pkt->pkt_dts;
return pkt;
}
{
if (us) {
free(us->us_array);
+ us->us_size = 0;
+ us->us_count = 0;
}
- us->us_size = 0;
- us->us_count = 0;
}
/* Destroy uuid set */
memset(&eq, 0, sizeof(eq));
eq.lang = strdup(lang);
eq.fulltext = 1;
- eq.stitle = s ? strdup(s) : NULL;
+ eq.stitle = strdup(s);
//Note: force min/max durations for this interface to 0 and INT_MAX seconds respectively
epg_query(&eq, hc->hc_access);
htsbuf_queue_t *hq;
char buf[255], ubuf[UUID_HEX_SIZE];
char *profile, *hostpath;
- const char *name, *blank, *sort;
- const char *lang = hc->hc_access->aa_lang_ui;
+ const char *name, *blank, *sort, *lang;
channel_t *ch;
channel_t **chlist;
int idx, count = 0;
access_verify2(hc->hc_access, ACCESS_STREAMING))
return HTTP_STATUS_UNAUTHORIZED;
+ lang = hc->hc_access->aa_lang_ui;
hq = &hc->hc_reply;
profile = profile_validate_name(http_arg_get(&hc->hc_req_args, "profile"));
hostpath = http_get_hostpath(hc);
int idx, count = 0;
int chidx, chcount = 0;
char *profile, *hostpath;
- const char *lang = hc->hc_access->aa_lang_ui;
- const char *blank, *sort;
+ const char *blank, *sort, *lang;
idnode_list_mapping_t *ilm;
if(hc->hc_access == NULL ||
access_verify2(hc->hc_access, ACCESS_STREAMING))
return HTTP_STATUS_UNAUTHORIZED;
+ lang = hc->hc_access->aa_lang_ui;
hq = &hc->hc_reply;
profile = profile_validate_name(http_arg_get(&hc->hc_req_args, "profile"));
hostpath = http_get_hostpath(hc);