diff options
author | Stefan Schallenberg <infos@nafets.de> | 2013-09-11 22:22:07 +0200 |
---|---|---|
committer | Stefan Schallenberg <infos@nafets.de> | 2013-09-11 22:22:07 +0200 |
commit | 02d155ebe1a7d27aea3a4c1d99d2f9bf91b619a6 (patch) | |
tree | 939c3e0a9e30cecb13977477c1f69e0e9bb59875 | |
parent | 0b8bf3d58c09daa4ef7ec5bc9e02efad001af097 (diff) | |
download | vdr-plugin-ffnetdev-master.tar.gz vdr-plugin-ffnetdev-master.tar.bz2 |
-rw-r--r-- | clientcontrol.c | 3 | ||||
-rw-r--r-- | osdworker.c | 5 | ||||
-rw-r--r-- | tool_socket.c | 12 | ||||
-rw-r--r-- | tsworker.c | 15 | ||||
-rw-r--r-- | vncEncodeHexT.c | 2 | ||||
-rw-r--r-- | vncEncodeRRE.c | 4 |
6 files changed, 18 insertions, 23 deletions
diff --git a/clientcontrol.c b/clientcontrol.c index 136531a..4949c8e 100644 --- a/clientcontrol.c +++ b/clientcontrol.c @@ -174,7 +174,7 @@ void cClientControl::Action(void) case ptInfo: if (m_ClientSocket->Read(&info, data.dataLen) == data.dataLen) m_pPlugin->SetClientName(info.clientName); - dsyslog("clientName %s, data.dataLen %d %d", info.clientName, data.dataLen, sizeof(data)); + dsyslog("clientName %s, data.dataLen %d %ld", info.clientName, data.dataLen, sizeof(data)); break; case ptPlayStateReq: @@ -274,7 +274,6 @@ bool cClientControl::SendStillPicture(const uchar *Data, int Length) bool cClientControl::SendSFreeze() { SClientControl data; - int written, available, done; if ((m_Instance == NULL) || (m_Instance->m_ClientSocket == NULL) || (!m_Instance->m_bHaveClient)) return false; diff --git a/osdworker.c b/osdworker.c index c928f03..16f0345 100644 --- a/osdworker.c +++ b/osdworker.c @@ -652,7 +652,6 @@ void cOSDWorker::Action(void) { */ //fprintf(stderr, "State: %d\n",state); - int res; switch (state) { case NO_CLIENT: /* Accept connecting OSD clients */ @@ -686,7 +685,7 @@ void cOSDWorker::Action(void) { case CLIENT_CONNECTED: rfbProtocolVersionMsg pvmsg; - res = m_OSDClient->Read(&pvmsg, sz_rfbProtocolVersionMsg); + m_OSDClient->Read(&pvmsg, sz_rfbProtocolVersionMsg); #ifdef DEBUG fprintf(stderr, "[ffnetdev] VNC: Client wants RFB protocol version %s\n", pvmsg); #endif @@ -729,7 +728,7 @@ void cOSDWorker::Action(void) { break; case AUTHENTICATED: rfbClientInitMsg cimsg; - res = m_OSDClient->Read(&cimsg, sz_rfbClientInitMsg); + m_OSDClient->Read(&cimsg, sz_rfbClientInitMsg); #ifdef DEBUG fprintf(stderr, "[ffnetdev] VNC: Client wants %s desktop(ignored).\n", cimsg.shared ? "shared":"non-shared"); diff --git a/tool_socket.c b/tool_socket.c index ef20561..63c77fb 100644 --- a/tool_socket.c +++ b/tool_socket.c @@ -23,7 +23,6 @@ cTBSocket::~cTBSocket() { bool cTBSocket::OpenUDP(const std::string &Host, unsigned int Port) { int socket; - struct sockaddr_in my_addr; if (IsOpen()) Close(); @@ -34,9 +33,6 @@ bool cTBSocket::OpenUDP(const std::string &Host, unsigned int Port) { m_RemoteAddr.sin_port = htons(Port); m_RemoteAddr.sin_addr.s_addr = inet_addr(Host.c_str()); - my_addr.sin_family = AF_INET; - my_addr.sin_port = htons(Port); - my_addr.sin_addr.s_addr = htonl(INADDR_ANY); /* limit the tx buf size to limit latency */ #ifdef UDP_TX_BUF_SIZE @@ -50,7 +46,13 @@ bool cTBSocket::OpenUDP(const std::string &Host, unsigned int Port) { goto closefd;*/ /* the bind is needed to give a port to the socket now */ -/* if (bind(socket,(struct sockaddr *)&my_addr, sizeof(my_addr)) < 0) +/* + struct sockaddr_in my_addr; + my_addr.sin_family = AF_INET; + my_addr.sin_port = htons(Port); + my_addr.sin_addr.s_addr = htonl(INADDR_ANY); + + if (bind(socket,(struct sockaddr *)&my_addr, sizeof(my_addr)) < 0) goto closefd;*/ if (!cTBSource::Open(socket)) @@ -245,7 +245,7 @@ void cTSWorker::ActionTCP(void) { fprintf(stderr, "[ffnetdev] Streamer: current TransferRate %2.3f MBit/Sec, %d Bytes send, %d%% Buffer used\n", rate, bytessend - oldbytessend, bufstat); #endif - dsyslog("[ffnetdev] Streamer: Rate %2.3f MBit/Sec, %d Bytes send, %d%% Buffer used\n", + dsyslog("[ffnetdev] Streamer: Rate %2.3f MBit/Sec, %ld Bytes send, %d%% Buffer used\n", rate, bytessend - oldbytessend, bufstat); oldbytessend = bytessend; @@ -286,8 +286,6 @@ void cTSWorker::ActionUDP(void) long bytessend = 0; long oldbytessend = 0; long toSend = 0; - int restData = 0; - TSData tsData; const char* StreamIp = "192.168.0.61"; uint StreamPort = TSPort; @@ -304,9 +302,6 @@ void cTSWorker::ActionUDP(void) isyslog("[ffnetdev] Streamer: UDP-Socket create successful"); gettimeofday(&oldtime, 0); - tsData.packNr = 0; - tsData.packsCount = 0; - tsData.tsHeaderCRC = 0; while (m_Active) { @@ -350,11 +345,11 @@ void cTSWorker::ActionUDP(void) int available = count; int done = 0; int written = 0; - char data[100]; - int rcvCount; int sleepTime; - /* rcvCount=m_StreamClient.Read(data, 10); + /* char data[100]; + int rcvCount; + rcvCount=m_StreamClient.Read(data, 10); if (rcvCount > 0) { isyslog("[ffnetdev] Streamer: empfangen:%d Bytes\n", rcvCount); @@ -421,7 +416,7 @@ void cTSWorker::ActionUDP(void) fprintf(stderr, "[ffnetdev] Streamer: current TransferRate %2.3f MBit/Sec, %d Bytes send\n", rate, bytessend - oldbytessend); #endif - dsyslog("[ffnetdev] Streamer: current TransferRate %2.3f MBit/Sec, %d Bytes send\n", + dsyslog("[ffnetdev] Streamer: current TransferRate %2.3f MBit/Sec, %ld Bytes send\n", rate, bytessend - oldbytessend); oldbytessend = bytessend; diff --git a/vncEncodeHexT.c b/vncEncodeHexT.c index a478c98..57f568f 100644 --- a/vncEncodeHexT.c +++ b/vncEncodeHexT.c @@ -362,7 +362,7 @@ testColours##bpp(CARD##bpp *data, int size, \ bool *mono, bool *solid, \ CARD##bpp *bg, CARD##bpp *fg) \ { \ - CARD##bpp colour1, colour2; \ + CARD##bpp colour1=0, colour2=0; \ int n1 = 0, n2 = 0; \ *mono = true; \ *solid = true; \ diff --git a/vncEncodeRRE.c b/vncEncodeRRE.c index e479939..883ef0f 100644 --- a/vncEncodeRRE.c +++ b/vncEncodeRRE.c @@ -119,7 +119,7 @@ subrectEncode##bpp( \ rfbRectangle subrect; \ int x,y; \ int i,j; \ - int hx,hy,vx,vy; \ + int hx=0,hy,vx=0,vy; \ int hyflag; \ CARD##bpp *seg; \ CARD##bpp *line; \ @@ -145,7 +145,7 @@ subrectEncode##bpp( \ seg = data+(j*w); \ if (seg[x] != cl) {break;} \ i = x; \ - while ((i < w) && (seg[i] == cl)) i += 1; \ + while ((seg[i] == cl) && (i < w)) i += 1; \ i -= 1; \ if (j == y) vx = hx = i; \ if (i < vx) vx = i; \ |