}
- if (fd) {
+ if (fd >= 0) {
tvhlog(LOG_DEBUG, "capmt", "%s: Created socket %d", capmt_name(capmt), fd);
capmt->capmt_sock[i] = fd;
capmt->capmt_sock_reconnect[i]++;
static void
capmt_send_stop_descrambling(capmt_t *capmt)
{
- uint8_t buf[8];
-
- buf[0] = 0x9F;
- buf[1] = 0x80;
- buf[2] = 0x3F;
- buf[3] = 0x04;
-
- buf[4] = 0x83;
- buf[5] = 0x02;
- buf[6] = 0x00;
- buf[7] = 0xFF; //wildcard demux id
-
+ static uint8_t buf[8] = {
+ 0x9F,
+ 0x80,
+ 0x3F,
+ 0x04,
+ 0x83,
+ 0x02,
+ 0x00,
+ 0xFF, /* wildcard demux id */
+ };
capmt_write_msg(capmt, 0, 0, buf, 8);
}