Projects

Ticket #6: dss-6.0.3.patch

File dss-6.0.3.patch, 14.7 KB (added by claydawg52@…, 19 months ago)

Sverker's Patch

  • APICommonCode/QTAccessFile.cpp

    diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/APICommonCode/QTAccessFile.cpp DarwinStreamingSrvr6.0.3-Source/APICommonCode/QTAccessFile.cpp
    old new  
    4646 
    4747 
    4848#include <grp.h> 
     49#ifdef __MacOSX__ 
    4950#include <membership.h> 
     51#endif 
    5052#include <pwd.h> 
    5153#include <signal.h> 
    5254#include <unistd.h> 
     
    613615 
    614616bool DSAccessFile::CheckGroupMembership(const char* inUsername, const char* inGroupName) 
    615617{    
     618#ifdef __MacOSX__ 
    616619        // In Tiger, group membership is painfully simple: we ask memberd for it! 
    617620        struct passwd   *user           = NULL; 
    618621        struct group    *group          = NULL; 
     
    641644        if ( mbr_check_membership(userID, groupID, &isMember) ) 
    642645                return false; 
    643646        return (bool)isMember; 
     647#else 
     648        return true; 
     649#endif 
    644650} 
    645651 
    646652Bool16 DSAccessFile::ValidUser( char*userName, void* extraDataPtr) 
  • CommonUtilitiesLib/OSHeaders.h

    diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/CommonUtilitiesLib/OSHeaders.h DarwinStreamingSrvr6.0.3-Source/CommonUtilitiesLib/OSHeaders.h
    old new  
    120120 
    121121     
    122122#elif __linux__ || __linuxppc__ || __FreeBSD__ 
    123      
    124123    /* Defines */ 
    125124    #define _64BITARG_ "q" 
    126125    #define _S64BITARG_ "lld" 
     
    128127#if __LP64__ 
    129128        #define _S32BITARG_ "d" 
    130129        #define _U32BITARG_ "u" 
     130        #define _SPOINTERSIZEARG_ _S64BITARG_ 
     131        #define _UPOINTERSIZEARG_ _U64BITARG_ 
    131132#else 
    132         #define _S32BITARG_ "ld" 
    133         #define _U32BITARG_ "lu" 
     133        #define _S32BITARG_ "d" 
     134        #define _U32BITARG_ "u" 
     135        #define _SPOINTERSIZEARG_ _S32BITARG_ 
     136        #define _UPOINTERSIZEARG_ _U32BITARG_ 
    134137#endif 
    135138 
    136139    /* paths */ 
     
    141144 
    142145    /* Includes */ 
    143146    #include <sys/types.h> 
     147    #include <stdint.h> 
    144148     
    145149    /* Constants */ 
    146150    #define QT_TIME_TO_LOCAL_TIME   (-2082844800) 
     
    149153    /* Typedefs */ 
    150154    typedef signed long         PointerSizedInt; 
    151155    typedef unsigned long       PointerSizedUInt; 
    152     typedef unsigned char       UInt8; 
    153     typedef signed char         SInt8; 
    154     typedef unsigned short      UInt16; 
    155     typedef signed short        SInt16; 
    156     typedef unsigned int        UInt32; 
    157     typedef signed int          SInt32; 
    158     typedef signed int int      SInt64; 
    159     typedef unsigned int int    UInt64; 
     156    typedef uint8_t             UInt8; 
     157    typedef int8_t              SInt8; 
     158    typedef uint16_t            UInt16; 
     159    typedef int16_t             SInt16; 
     160    typedef uint32_t            UInt32; 
     161    typedef int32_t             SInt32; 
     162    typedef int64_t             SInt64; 
     163    typedef uint64_t            UInt64; 
    160164    typedef float               Float32; 
    161165    typedef double              Float64; 
    162166    typedef UInt16              Bool16; 
     
    177181         
    178182    #define TW0_CHARS_TO_INT( c1, c2 )  ( c1 << 8 | c2 ) 
    179183 
     184    #define kSInt16_Max USHRT_MAX 
     185    #define kUInt16_Max USHRT_MAX 
    180186 
     187    #define kSInt32_Max LONG_MAX 
     188    #define kUInt32_Max ULONG_MAX 
    181189 
    182  
    183  
    184  
     190    #define kSInt64_Max LONG_LONG_MAX 
     191    #define kUInt64_Max ULONG_LONG_MAX 
    185192 
    186193#elif __Win32__ 
    187194     
  • DarwinStreamingSrvr6.0.3-Source

    diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/CommonUtilitiesLib/OSRef.h DarwinStreamingSrvr6.0.3-Source/CommonUtilitiesLib/OSRef.h
    old new  
    4545#include "StrPtrLen.h" 
    4646#include "OSHashTable.h" 
    4747#include "OSCond.h" 
     48#include "OSHeaders.h" 
    4849 
    4950class OSRefKey; 
    5051 
  • DarwinStreamingSrvr6.0.3-Source

    diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/Makefile.POSIX DarwinStreamingSrvr6.0.3-Source/Makefile.POSIX
    old new  
    4242CCFLAGS += -IRTPMetaInfoLib 
    4343CCFLAGS += -IPrefsSourceLib 
    4444CCFLAGS += -IServer.tproj 
    45  
    4645# EACH DIRECTORY WITH A STATIC LIBRARY MUST BE APPENDED IN THIS MANNER TO THE LINKOPTS 
    4746 
    4847LINKOPTS = -LCommonUtilitiesLib 
     
    5251 
    5352CFILES = CommonUtilitiesLib/daemon.c 
    5453 
    55 CPPFILES =      Server.tproj/QTSSExpirationDate.cpp\ 
     54CPPFILES =              Server.tproj/GenerateXMLPrefs.cpp \ 
     55                        Server.tproj/main.cpp \ 
    5656                        Server.tproj/QTSSCallbacks.cpp \ 
    57                         Server.tproj/QTSSDictionary.cpp\ 
    5857                        Server.tproj/QTSSDataConverter.cpp \ 
     58                        Server.tproj/QTSSDictionary.cpp \ 
    5959                        Server.tproj/QTSSErrorLogModule.cpp \ 
    60                         Server.tproj/QTSSMessages.cpp\ 
     60                        Server.tproj/QTSServer.cpp \ 
     61                        Server.tproj/QTSServerInterface.cpp \ 
     62                        Server.tproj/QTSServerPrefs.cpp \ 
     63                        Server.tproj/QTSSExpirationDate.cpp \ 
     64                        Server.tproj/QTSSFile.cpp \ 
     65                        Server.tproj/QTSSMessages.cpp \ 
    6166                        Server.tproj/QTSSModule.cpp \ 
    62                         Server.tproj/QTSServerPrefs.cpp\ 
    63                         Server.tproj/QTSSSocket.cpp\ 
    64                         Server.tproj/QTSSFile.cpp\ 
    6567                        Server.tproj/QTSSPrefs.cpp \ 
    66                         Server.tproj/QTSServer.cpp\ 
    67                         Server.tproj/QTSServerInterface.cpp \ 
    68                         Server.tproj/RTCPTask.cpp\ 
    69                         Server.tproj/RTPSession.cpp \ 
    70                         Server.tproj/RTPPacketResender.cpp \ 
     68                        Server.tproj/QTSSSocket.cpp \ 
     69                        Server.tproj/QTSSUserProfile.cpp \ 
     70                        Server.tproj/RTCPTask.cpp \ 
    7171                        Server.tproj/RTPBandwidthTracker.cpp \ 
    7272                        Server.tproj/RTPOverbufferWindow.cpp \ 
    73                         Server.tproj/RTPSessionInterface.cpp\ 
     73                        Server.tproj/RTPPacketResender.cpp \ 
     74                        Server.tproj/RTPSession3GPP.cpp \ 
     75                        Server.tproj/RTPSession.cpp \ 
     76                        Server.tproj/RTPSessionInterface.cpp \ 
     77                        Server.tproj/RTPStream3gpp.cpp \ 
    7478                        Server.tproj/RTPStream.cpp \ 
    75                         Server.tproj/RTSPProtocol.cpp\ 
     79                        Server.tproj/RTSPProtocol.cpp \ 
     80                        Server.tproj/RTSPRequest3GPP.cpp \ 
    7681                        Server.tproj/RTSPRequest.cpp \ 
    77                         Server.tproj/RTSPRequestInterface.cpp\ 
     82                        Server.tproj/RTSPRequestInterface.cpp \ 
    7883                        Server.tproj/RTSPRequestStream.cpp \ 
    79                         Server.tproj/RTSPResponseStream.cpp\ 
     84                        Server.tproj/RTSPResponseStream.cpp \ 
     85                        Server.tproj/RTSPSession3GPP.cpp \ 
    8086                        Server.tproj/RTSPSession.cpp \ 
    81                         Server.tproj/RTSPSessionInterface.cpp\ 
    82                         Server.tproj/main.cpp \ 
     87                        Server.tproj/RTSPSessionInterface.cpp \ 
    8388                        Server.tproj/RunServer.cpp \ 
    84                         Server.tproj/GenerateXMLPrefs.cpp \ 
    85                         Server.tproj/QTSSUserProfile.cpp\ 
    86                         PrefsSourceLib/FilePrefsSource.cpp\ 
     89                        PrefsSourceLib/FilePrefsSource.cpp \ 
    8790                        PrefsSourceLib/XMLPrefsParser.cpp \ 
    8891                        PrefsSourceLib/XMLParser.cpp \ 
    8992                        OSMemoryLib/OSMemory.cpp \ 
     
    9194                        RTSPClientLib/ClientSocket.cpp \ 
    9295                        HTTPUtilitiesLib/HTTPProtocol.cpp \ 
    9396                        HTTPUtilitiesLib/HTTPRequest.cpp \ 
    94                         RTCPUtilitiesLib/RTCPAPPPacket.cpp\ 
     97                        RTCPUtilitiesLib/RTCPAckPacket.cpp \ 
     98                        RTCPUtilitiesLib/RTCPAPPNADUPacket.cpp \ 
     99                        RTCPUtilitiesLib/RTCPAPPPacket.cpp \ 
     100                        RTCPUtilitiesLib/RTCPAPPQTSSPacket.cpp \ 
    95101                        RTCPUtilitiesLib/RTCPPacket.cpp \ 
    96                         RTCPUtilitiesLib/RTCPSRPacket.cpp\ 
    97                         RTCPUtilitiesLib/RTCPAckPacket.cpp\ 
    98                         RTPMetaInfoLib/RTPMetaInfoPacket.cpp\ 
     102                        RTCPUtilitiesLib/RTCPSRPacket.cpp \ 
     103                        RTPMetaInfoLib/RTPMetaInfoPacket.cpp \ 
    99104                        APIStubLib/QTSS_Private.cpp \ 
    100105                        APICommonCode/QTSSModuleUtils.cpp\ 
    101106                        APICommonCode/QTSSRollingLog.cpp \ 
    102107                        APICommonCode/SDPSourceInfo.cpp \ 
    103108                        APICommonCode/SourceInfo.cpp \ 
    104109                        APICommonCode/QTAccessFile.cpp \ 
     110                        APICommonCode/QTSS3GPPModuleUtils.cpp \ 
    105111                        SafeStdLib/InternalStdLib.cpp \ 
    106112                        APIModules/QTSSAccessLogModule/QTSSAccessLogModule.cpp \ 
    107113                        APIModules/QTSSFileModule/QTSSFileModule.cpp \ 
     
    129135                        APIModules/QTSSAccessModule/QTSSAccessModule.cpp \ 
    130136                        APIModules/QTSSHttpFileModule/QTSSHttpFileModule.cpp \ 
    131137                        APIModules/QTSSAccessModule/AccessChecker.cpp 
    132                          
     138 
    133139# CCFLAGS += $(foreach dir,$(HDRS),-I$(dir)) 
    134140 
    135141LIBFILES =      QTFileLib/libQTFileLib.a \ 
  • RTSPClientLib/PlayerSimulator.h

    diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/RTSPClientLib/PlayerSimulator.h DarwinStreamingSrvr6.0.3-Source/RTSPClientLib/PlayerSimulator.h
    old new  
    3131#ifndef _PLAYERSIMULATOR_H_ 
    3232#define _PLAYERSIMULATOR_H_ 
    3333 
    34 #include "SafeStdLib.h"" 
     34#include "SafeStdLib.h" 
    3535#include "OSHeaders.h" 
    3636#include "OS.h" 
    3737#include "SVector.h" 
  • Server.tproj/QTSSErrorLogModule.cpp

    diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/Server.tproj/QTSSErrorLogModule.cpp DarwinStreamingSrvr6.0.3-Source/Server.tproj/QTSSErrorLogModule.cpp
    old new  
    265265     
    266266                sDupErrorStringCount = 0; 
    267267            } 
    268             ::strlcpy(sLastErrorString, inParamBlock->errorParams.inBuffer, sizeof(sLastErrorString)); 
     268#if __MacOSX__ 
     269            strlcpy(sLastErrorString, inParamBlock->errorParams.inBuffer, sizeof(sLastErrorString)); 
     270#else 
     271            strncpy(sLastErrorString, inParamBlock->errorParams.inBuffer, sizeof(sLastErrorString) -1); 
     272#endif 
    269273         
    270274        } 
    271275 
  • DarwinStreamingSrvr6.0.3-Source

    diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/Server.tproj/QTSServer.cpp DarwinStreamingSrvr6.0.3-Source/Server.tproj/QTSServer.cpp
    old new  
    7070#include "QTSSAdminModule.h" 
    7171#include "QTSSAccessModule.h" 
    7272#include "QTSSMP3StreamingModule.h" 
     73#if __MacOSX__ 
    7374#include "QTSSDSAuthModule.h" 
     75#endif 
    7476#if MEMORY_DEBUGGING 
    7577#include "QTSSWebDebugModule.h" 
    7678#endif 
     
    8587#include "RTCPTask.h" 
    8688#include "QTSSFile.h" 
    8789 
    88 #include "RTPStream3GPP.h" 
     90#include "RTPStream3gpp.h" 
    8991#include "RTSPRequest3GPP.h" 
    9092 
    9193// CLASS DEFINITIONS 
     
    680682    (void)AddModule(theWebDebug); 
    681683#endif 
    682684 
     685#if __MacOSX__ 
    683686    QTSSModule* theQTSSDSAuthModule = new QTSSModule("QTSSDSAuthModule"); 
    684687    (void)theQTSSDSAuthModule->SetupModule(&sCallbacks, &QTSSDSAuthModule_Main); 
    685688    (void)AddModule(theQTSSDSAuthModule);  
     689#endif 
    686690 
    687691    QTSSModule* theQTACCESSmodule = new QTSSModule("QTSSAccessModule"); 
    688692    (void)theQTACCESSmodule->SetupModule(&sCallbacks, &QTSSAccessModule_Main); 
  • DarwinStreamingSrvr6.0.3-Source

    diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/Server.tproj/RTPSession.cpp DarwinStreamingSrvr6.0.3-Source/Server.tproj/RTPSession.cpp
    old new  
    3838#include "RTSPProtocol.h"  
    3939#include "QTSServerInterface.h" 
    4040#include "QTSS.h" 
    41 #include "RTSPRequest3gpp.h" 
     41#include "RTSPRequest3GPP.h" 
    4242 
    4343#include "OS.h" 
    4444#include "OSMemory.h" 
  • Server.tproj/RTPStream3gpp.cpp

    diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/Server.tproj/RTPStream3gpp.cpp DarwinStreamingSrvr6.0.3-Source/Server.tproj/RTPStream3gpp.cpp
    old new  
    3434#include "RTPStream.h" 
    3535#include "RTPStream3gpp.h" 
    3636#include "RTPSessionInterface.h" 
    37 #include "RTSPRequest3gpp.h" 
     37#include "RTSPRequest3GPP.h" 
    3838#include "RTCPAPPNADUPacket.h" 
    3939 
    4040#if DEBUG 
  • DarwinStreamingSrvr6.0.3-Source

    diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/Server.tproj/RTPStream.h DarwinStreamingSrvr6.0.3-Source/Server.tproj/RTPStream.h
    old new  
    5757 
    5858#include "RTCPPacket.h" 
    5959 
    60 #include "RTSPRequest3gpp.h" 
     60#include "RTSPRequest3GPP.h" 
    6161 
    6262#ifndef MIN 
    6363#define MIN(a,b) (((a)<(b))?(a):(b)) 
  • Server.tproj/RTSPRequest3GPP.cpp

    diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/Server.tproj/RTSPRequest3GPP.cpp DarwinStreamingSrvr6.0.3-Source/Server.tproj/RTSPRequest3GPP.cpp
    old new  
    3232*/ 
    3333 
    3434 
    35 #include "RTSPRequest3gpp.h" 
     35#include "RTSPRequest3GPP.h" 
    3636#include "RTSPProtocol.h" 
    3737#include "QTSServerInterface.h" 
    3838 
  • StreamingLoadTool/Makefile.POSIX

    diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/StreamingLoadTool/Makefile.POSIX DarwinStreamingSrvr6.0.3-Source/StreamingLoadTool/Makefile.POSIX
    old new  
    1717CCFLAGS += -I.. 
    1818CCFLAGS += -I../OSMemoryLib 
    1919CCFLAGS += -I../RTSPClientLib 
     20CCFLAGS += -I../RTCPUtilitiesLib 
    2021CCFLAGS += -I../APICommonCode 
    2122CCFLAGS += -I../CommonUtilitiesLib 
    2223CCFLAGS += -I../PrefsSourceLib 
     
    3637                        ../RTSPClientLib/ClientSocket.cpp \ 
    3738                        ../RTSPClientLib/RTSPClient.cpp \ 
    3839                        ../RTSPClientLib/ClientSession.cpp \ 
     40                        ../RTCPUtilitiesLib/RTCPAckPacket.cpp \ 
     41                        ../RTCPUtilitiesLib/RTCPAPPNADUPacket.cpp \ 
     42                        ../RTCPUtilitiesLib/RTCPAPPPacket.cpp \ 
     43                        ../RTCPUtilitiesLib/RTCPAPPQTSSPacket.cpp \ 
     44                        ../RTCPUtilitiesLib/RTCPPacket.cpp \ 
     45                        ../RTCPUtilitiesLib/RTCPSRPacket.cpp \ 
    3946                        ../PrefsSourceLib/FilePrefsSource.cpp \ 
    4047                        ../APICommonCode/SDPSourceInfo.cpp \ 
    4148                        ../APICommonCode/SourceInfo.cpp \ 
  • StreamingLoadTool/StreamingLoadTool.cpp

    diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/StreamingLoadTool/StreamingLoadTool.cpp DarwinStreamingSrvr6.0.3-Source/StreamingLoadTool/StreamingLoadTool.cpp
    old new  
    743743             
    744744            bitsReceived += .5; 
    745745             
    746                         printf("%5lu %6lu %8lu %6lu %6lu %6lu %9.0fk\n", 
     746                        printf("%5"_U32BITARG_" %6"_U32BITARG_" %8"_U32BITARG_" %6"_U32BITARG_" %6"_U32BITARG_" %6"_U32BITARG_" %9.0fk\n", 
    747747                                ClientSession:: GetActiveConnections (), 
    748748                                ClientSession:: GetPlayingConnections (), 
    749749                                ClientSession:: GetConnectionAttempts (), 
     
    811811        if (sLog != NULL) 
    812812                ::fclose(sLog); 
    813813                 
    814         printf("%5lu %6lu %8lu %6lu %6lu %6lu %9.0fk\n", 
     814        printf("%5"_U32BITARG_" %6"_U32BITARG_" %8"_U32BITARG_" %6"_U32BITARG_" %6"_U32BITARG_" %6"_U32BITARG_" %9.0fk\n", 
    815815                ClientSession:: GetActiveConnections (), 
    816816                ClientSession:: GetPlayingConnections (), 
    817817                ClientSession:: GetConnectionAttempts (),