Skip to content

Commit

Permalink
Revert "SocketHandler: proto v1: add compatibility for old OSCams"
Browse files Browse the repository at this point in the history
This reverts commit b5bab85.

This probing was added only for transitional period to not break
connections with OSCams < svn rev 9869.
I believe no one is now using such an over-year old oscam along
with this recent plugin :)
  • Loading branch information
manio committed Dec 31, 2015
1 parent ce8a124 commit 068ef1f
Showing 1 changed file with 1 addition and 31 deletions.
32 changes: 1 addition & 31 deletions SocketHandler.cpp
Expand Up @@ -194,35 +194,6 @@ void SocketHandler::Action(void)
uint8_t adapter_index;
int faults = 0;
int skip_bytes = 0;
bool new_oscam = false;

// for the compatibility with old oscam, ask if it can use
// the new protocol - if not, we will not try to use it later
OpenConnection();
SendClientInfo();
cCondWait::SleepMs(20);
cRead = recv(sock, &buff[0], 6, MSG_DONTWAIT);
if (cRead == 6)
{
request = (uint32_t *) &buff;
if (ntohl(*request) == DVBAPI_SERVER_INFO)
{
unsigned char len;

uint16_t *proto_ver_ptr = (uint16_t *) &buff[4];
protocol_version = ntohs(*proto_ver_ptr);

recv(sock, &len, 1, MSG_DONTWAIT); //string length
cRead = recv(sock, buff+6, len, MSG_DONTWAIT);
buff[6+len] = 0; //terminate the string
DEBUGLOG("%s: Got SERVER_INFO: %s, protocol_version = %d", __FUNCTION__, &buff[6], protocol_version);

new_oscam = true;
DEBUGLOG("OSCam is supporting dvbapi protocol v1 or above");
}
}
if (!new_oscam)
CloseConnection();

while (Running())
{
Expand All @@ -236,8 +207,7 @@ void SocketHandler::Action(void)
{
DEBUGLOG("Successfully (re)connected to OSCam");
faults = 0;
if (new_oscam)
SendClientInfo();
SendClientInfo();
capmt->SendAll();
}
else
Expand Down

0 comments on commit 068ef1f

Please sign in to comment.