Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
show extended key mode in server info string
  • Loading branch information
perexg committed May 29, 2017
1 parent 71f3208 commit 3fc4928
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion module-dvbapi.c
Expand Up @@ -514,13 +514,19 @@ int32_t dvbapi_net_send(uint32_t request, int32_t socket_fd, int32_t demux_index
case DVBAPI_SERVER_INFO:
{
int16_t proto_version = htons(DVBAPI_PROTOCOL_VERSION); //our protocol version
char capabilities[128] = "\x00"; // two zero characters
memcpy(&packet[size], &proto_version, 2);
size += 2;

unsigned char *info_len = &packet[size]; //info string length
size += 1;

*info_len = snprintf((char *) &packet[size], sizeof(packet) - size, "OSCam v%s, build r%s (%s)", CS_VERSION, CS_SVN_VERSION, CS_TARGET);
if (cfg.dvbapi_extended_cw_api == 1)
strcat(capabilities, ",e1km"); //extended cw, mode follows key
if (cfg.dvbapi_extended_cw_api == 2)
strcat(capabilities, ",e2");

*info_len = snprintf((char *) &packet[size], sizeof(packet) - size, "OSCam v%s, build r%s (%s); %s", CS_VERSION, CS_SVN_VERSION, CS_TARGET, capabilities + 1);
size += *info_len;
break;
}
Expand Down

0 comments on commit 3fc4928

Please sign in to comment.