From 068ef1f69475981f9fbd57f6b0e3ad475b566893 Mon Sep 17 00:00:00 2001 From: Mariusz Bialonczyk Date: Thu, 31 Dec 2015 06:24:04 +0100 Subject: [PATCH] Revert "SocketHandler: proto v1: add compatibility for old OSCams" This reverts commit b5bab856597a07c97c1b51bc8131fc66983bc9ec. 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 :) --- SocketHandler.cpp | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) diff --git a/SocketHandler.cpp b/SocketHandler.cpp index 0127594..c869db7 100644 --- a/SocketHandler.cpp +++ b/SocketHandler.cpp @@ -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()) { @@ -236,8 +207,7 @@ void SocketHandler::Action(void) { DEBUGLOG("Successfully (re)connected to OSCam"); faults = 0; - if (new_oscam) - SendClientInfo(); + SendClientInfo(); capmt->SendAll(); } else