[SCM] kodi-pvr-vdr-vnsi/master: responsepacket: remove method serverError()

tiber-guest at users.alioth.debian.org tiber-guest at users.alioth.debian.org
Sun Feb 28 15:46:48 UTC 2016


The following commit has been merged in the master branch:
commit 8e0089b1d1a1af0d7d8b5331bf9c8b9ad6eef8c8
Author: Max Kellermann <max at duempel.org>
Date:   Thu Nov 5 11:13:13 2015 +0100

    responsepacket: remove method serverError()
    
    As described in my commit message of 0ee29a6, the method serverError()
    was used in a way that was never going to work as designed.  Let's
    remove this.  All callers have been changed to check the packet length
    before attempting to parse the packet.

diff --git a/src/responsepacket.cpp b/src/responsepacket.cpp
index 4a1d7b7..4842de9 100644
--- a/src/responsepacket.cpp
+++ b/src/responsepacket.cpp
@@ -149,16 +149,8 @@ void cResponsePacket::extractOSDHeader()
   userDataLength = extract_U32();
 }
 
-int cResponsePacket::serverError()
-{
-  if ((packetPos == 0) && (userDataLength == 4) && !ntohl(*(uint32_t*)userData)) return 1;
-  else return 0;
-}
-
 char* cResponsePacket::extract_String()
 {
-  if (serverError()) return NULL;
-
   char *p = (char *)&userData[packetPos];
   const char *end = (const char *)memchr(p, '\0', userDataLength - packetPos);
   if (end == NULL)
diff --git a/src/responsepacket.h b/src/responsepacket.h
index 5af0eed..6044d67 100644
--- a/src/responsepacket.h
+++ b/src/responsepacket.h
@@ -39,7 +39,6 @@ class cResponsePacket
     void extractOSDHeader();
 
     bool noResponse() { return (userData == NULL); };
-    int  serverError();
 
     uint32_t  getUserDataLength() { return userDataLength; }
     uint32_t  getChannelID()      { return channelID; }

-- 
kodi-pvr-vdr-vnsi packaging



More information about the pkg-multimedia-commits mailing list