diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/APICommonCode/QTAccessFile.cpp DarwinStreamingSrvr6.0.3-Source/APICommonCode/QTAccessFile.cpp
|
old
|
new
|
|
| 46 | 46 | |
| 47 | 47 | |
| 48 | 48 | #include <grp.h> |
| | 49 | #ifdef __MacOSX__ |
| 49 | 50 | #include <membership.h> |
| | 51 | #endif |
| 50 | 52 | #include <pwd.h> |
| 51 | 53 | #include <signal.h> |
| 52 | 54 | #include <unistd.h> |
| … |
… |
|
| 613 | 615 | |
| 614 | 616 | bool DSAccessFile::CheckGroupMembership(const char* inUsername, const char* inGroupName) |
| 615 | 617 | { |
| | 618 | #ifdef __MacOSX__ |
| 616 | 619 | // In Tiger, group membership is painfully simple: we ask memberd for it! |
| 617 | 620 | struct passwd *user = NULL; |
| 618 | 621 | struct group *group = NULL; |
| … |
… |
|
| 641 | 644 | if ( mbr_check_membership(userID, groupID, &isMember) ) |
| 642 | 645 | return false; |
| 643 | 646 | return (bool)isMember; |
| | 647 | #else |
| | 648 | return true; |
| | 649 | #endif |
| 644 | 650 | } |
| 645 | 651 | |
| 646 | 652 | Bool16 DSAccessFile::ValidUser( char*userName, void* extraDataPtr) |
diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/CommonUtilitiesLib/OSHeaders.h DarwinStreamingSrvr6.0.3-Source/CommonUtilitiesLib/OSHeaders.h
|
old
|
new
|
|
| 120 | 120 | |
| 121 | 121 | |
| 122 | 122 | #elif __linux__ || __linuxppc__ || __FreeBSD__ |
| 123 | | |
| 124 | 123 | /* Defines */ |
| 125 | 124 | #define _64BITARG_ "q" |
| 126 | 125 | #define _S64BITARG_ "lld" |
| … |
… |
|
| 128 | 127 | #if __LP64__ |
| 129 | 128 | #define _S32BITARG_ "d" |
| 130 | 129 | #define _U32BITARG_ "u" |
| | 130 | #define _SPOINTERSIZEARG_ _S64BITARG_ |
| | 131 | #define _UPOINTERSIZEARG_ _U64BITARG_ |
| 131 | 132 | #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_ |
| 134 | 137 | #endif |
| 135 | 138 | |
| 136 | 139 | /* paths */ |
| … |
… |
|
| 141 | 144 | |
| 142 | 145 | /* Includes */ |
| 143 | 146 | #include <sys/types.h> |
| | 147 | #include <stdint.h> |
| 144 | 148 | |
| 145 | 149 | /* Constants */ |
| 146 | 150 | #define QT_TIME_TO_LOCAL_TIME (-2082844800) |
| … |
… |
|
| 149 | 153 | /* Typedefs */ |
| 150 | 154 | typedef signed long PointerSizedInt; |
| 151 | 155 | 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; |
| 160 | 164 | typedef float Float32; |
| 161 | 165 | typedef double Float64; |
| 162 | 166 | typedef UInt16 Bool16; |
| … |
… |
|
| 177 | 181 | |
| 178 | 182 | #define TW0_CHARS_TO_INT( c1, c2 ) ( c1 << 8 | c2 ) |
| 179 | 183 | |
| | 184 | #define kSInt16_Max USHRT_MAX |
| | 185 | #define kUInt16_Max USHRT_MAX |
| 180 | 186 | |
| | 187 | #define kSInt32_Max LONG_MAX |
| | 188 | #define kUInt32_Max ULONG_MAX |
| 181 | 189 | |
| 182 | | |
| 183 | | |
| 184 | | |
| | 190 | #define kSInt64_Max LONG_LONG_MAX |
| | 191 | #define kUInt64_Max ULONG_LONG_MAX |
| 185 | 192 | |
| 186 | 193 | #elif __Win32__ |
| 187 | 194 | |
diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/CommonUtilitiesLib/OSRef.h DarwinStreamingSrvr6.0.3-Source/CommonUtilitiesLib/OSRef.h
|
old
|
new
|
|
| 45 | 45 | #include "StrPtrLen.h" |
| 46 | 46 | #include "OSHashTable.h" |
| 47 | 47 | #include "OSCond.h" |
| | 48 | #include "OSHeaders.h" |
| 48 | 49 | |
| 49 | 50 | class OSRefKey; |
| 50 | 51 | |
diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/Makefile.POSIX DarwinStreamingSrvr6.0.3-Source/Makefile.POSIX
|
old
|
new
|
|
| 42 | 42 | CCFLAGS += -IRTPMetaInfoLib |
| 43 | 43 | CCFLAGS += -IPrefsSourceLib |
| 44 | 44 | CCFLAGS += -IServer.tproj |
| 45 | | |
| 46 | 45 | # EACH DIRECTORY WITH A STATIC LIBRARY MUST BE APPENDED IN THIS MANNER TO THE LINKOPTS |
| 47 | 46 | |
| 48 | 47 | LINKOPTS = -LCommonUtilitiesLib |
| … |
… |
|
| 52 | 51 | |
| 53 | 52 | CFILES = CommonUtilitiesLib/daemon.c |
| 54 | 53 | |
| 55 | | CPPFILES = Server.tproj/QTSSExpirationDate.cpp\ |
| | 54 | CPPFILES = Server.tproj/GenerateXMLPrefs.cpp \ |
| | 55 | Server.tproj/main.cpp \ |
| 56 | 56 | Server.tproj/QTSSCallbacks.cpp \ |
| 57 | | Server.tproj/QTSSDictionary.cpp\ |
| 58 | 57 | Server.tproj/QTSSDataConverter.cpp \ |
| | 58 | Server.tproj/QTSSDictionary.cpp \ |
| 59 | 59 | 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 \ |
| 61 | 66 | Server.tproj/QTSSModule.cpp \ |
| 62 | | Server.tproj/QTSServerPrefs.cpp\ |
| 63 | | Server.tproj/QTSSSocket.cpp\ |
| 64 | | Server.tproj/QTSSFile.cpp\ |
| 65 | 67 | 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 \ |
| 71 | 71 | Server.tproj/RTPBandwidthTracker.cpp \ |
| 72 | 72 | 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 \ |
| 74 | 78 | Server.tproj/RTPStream.cpp \ |
| 75 | | Server.tproj/RTSPProtocol.cpp\ |
| | 79 | Server.tproj/RTSPProtocol.cpp \ |
| | 80 | Server.tproj/RTSPRequest3GPP.cpp \ |
| 76 | 81 | Server.tproj/RTSPRequest.cpp \ |
| 77 | | Server.tproj/RTSPRequestInterface.cpp\ |
| | 82 | Server.tproj/RTSPRequestInterface.cpp \ |
| 78 | 83 | Server.tproj/RTSPRequestStream.cpp \ |
| 79 | | Server.tproj/RTSPResponseStream.cpp\ |
| | 84 | Server.tproj/RTSPResponseStream.cpp \ |
| | 85 | Server.tproj/RTSPSession3GPP.cpp \ |
| 80 | 86 | Server.tproj/RTSPSession.cpp \ |
| 81 | | Server.tproj/RTSPSessionInterface.cpp\ |
| 82 | | Server.tproj/main.cpp \ |
| | 87 | Server.tproj/RTSPSessionInterface.cpp \ |
| 83 | 88 | Server.tproj/RunServer.cpp \ |
| 84 | | Server.tproj/GenerateXMLPrefs.cpp \ |
| 85 | | Server.tproj/QTSSUserProfile.cpp\ |
| 86 | | PrefsSourceLib/FilePrefsSource.cpp\ |
| | 89 | PrefsSourceLib/FilePrefsSource.cpp \ |
| 87 | 90 | PrefsSourceLib/XMLPrefsParser.cpp \ |
| 88 | 91 | PrefsSourceLib/XMLParser.cpp \ |
| 89 | 92 | OSMemoryLib/OSMemory.cpp \ |
| … |
… |
|
| 91 | 94 | RTSPClientLib/ClientSocket.cpp \ |
| 92 | 95 | HTTPUtilitiesLib/HTTPProtocol.cpp \ |
| 93 | 96 | HTTPUtilitiesLib/HTTPRequest.cpp \ |
| 94 | | RTCPUtilitiesLib/RTCPAPPPacket.cpp\ |
| | 97 | RTCPUtilitiesLib/RTCPAckPacket.cpp \ |
| | 98 | RTCPUtilitiesLib/RTCPAPPNADUPacket.cpp \ |
| | 99 | RTCPUtilitiesLib/RTCPAPPPacket.cpp \ |
| | 100 | RTCPUtilitiesLib/RTCPAPPQTSSPacket.cpp \ |
| 95 | 101 | RTCPUtilitiesLib/RTCPPacket.cpp \ |
| 96 | | RTCPUtilitiesLib/RTCPSRPacket.cpp\ |
| 97 | | RTCPUtilitiesLib/RTCPAckPacket.cpp\ |
| 98 | | RTPMetaInfoLib/RTPMetaInfoPacket.cpp\ |
| | 102 | RTCPUtilitiesLib/RTCPSRPacket.cpp \ |
| | 103 | RTPMetaInfoLib/RTPMetaInfoPacket.cpp \ |
| 99 | 104 | APIStubLib/QTSS_Private.cpp \ |
| 100 | 105 | APICommonCode/QTSSModuleUtils.cpp\ |
| 101 | 106 | APICommonCode/QTSSRollingLog.cpp \ |
| 102 | 107 | APICommonCode/SDPSourceInfo.cpp \ |
| 103 | 108 | APICommonCode/SourceInfo.cpp \ |
| 104 | 109 | APICommonCode/QTAccessFile.cpp \ |
| | 110 | APICommonCode/QTSS3GPPModuleUtils.cpp \ |
| 105 | 111 | SafeStdLib/InternalStdLib.cpp \ |
| 106 | 112 | APIModules/QTSSAccessLogModule/QTSSAccessLogModule.cpp \ |
| 107 | 113 | APIModules/QTSSFileModule/QTSSFileModule.cpp \ |
| … |
… |
|
| 129 | 135 | APIModules/QTSSAccessModule/QTSSAccessModule.cpp \ |
| 130 | 136 | APIModules/QTSSHttpFileModule/QTSSHttpFileModule.cpp \ |
| 131 | 137 | APIModules/QTSSAccessModule/AccessChecker.cpp |
| 132 | | |
| | 138 | |
| 133 | 139 | # CCFLAGS += $(foreach dir,$(HDRS),-I$(dir)) |
| 134 | 140 | |
| 135 | 141 | LIBFILES = QTFileLib/libQTFileLib.a \ |
diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/RTSPClientLib/PlayerSimulator.h DarwinStreamingSrvr6.0.3-Source/RTSPClientLib/PlayerSimulator.h
|
old
|
new
|
|
| 31 | 31 | #ifndef _PLAYERSIMULATOR_H_ |
| 32 | 32 | #define _PLAYERSIMULATOR_H_ |
| 33 | 33 | |
| 34 | | #include "SafeStdLib.h"" |
| | 34 | #include "SafeStdLib.h" |
| 35 | 35 | #include "OSHeaders.h" |
| 36 | 36 | #include "OS.h" |
| 37 | 37 | #include "SVector.h" |
diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/Server.tproj/QTSSErrorLogModule.cpp DarwinStreamingSrvr6.0.3-Source/Server.tproj/QTSSErrorLogModule.cpp
|
old
|
new
|
|
| 265 | 265 | |
| 266 | 266 | sDupErrorStringCount = 0; |
| 267 | 267 | } |
| 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 |
| 269 | 273 | |
| 270 | 274 | } |
| 271 | 275 | |
diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/Server.tproj/QTSServer.cpp DarwinStreamingSrvr6.0.3-Source/Server.tproj/QTSServer.cpp
|
old
|
new
|
|
| 70 | 70 | #include "QTSSAdminModule.h" |
| 71 | 71 | #include "QTSSAccessModule.h" |
| 72 | 72 | #include "QTSSMP3StreamingModule.h" |
| | 73 | #if __MacOSX__ |
| 73 | 74 | #include "QTSSDSAuthModule.h" |
| | 75 | #endif |
| 74 | 76 | #if MEMORY_DEBUGGING |
| 75 | 77 | #include "QTSSWebDebugModule.h" |
| 76 | 78 | #endif |
| … |
… |
|
| 85 | 87 | #include "RTCPTask.h" |
| 86 | 88 | #include "QTSSFile.h" |
| 87 | 89 | |
| 88 | | #include "RTPStream3GPP.h" |
| | 90 | #include "RTPStream3gpp.h" |
| 89 | 91 | #include "RTSPRequest3GPP.h" |
| 90 | 92 | |
| 91 | 93 | // CLASS DEFINITIONS |
| … |
… |
|
| 680 | 682 | (void)AddModule(theWebDebug); |
| 681 | 683 | #endif |
| 682 | 684 | |
| | 685 | #if __MacOSX__ |
| 683 | 686 | QTSSModule* theQTSSDSAuthModule = new QTSSModule("QTSSDSAuthModule"); |
| 684 | 687 | (void)theQTSSDSAuthModule->SetupModule(&sCallbacks, &QTSSDSAuthModule_Main); |
| 685 | 688 | (void)AddModule(theQTSSDSAuthModule); |
| | 689 | #endif |
| 686 | 690 | |
| 687 | 691 | QTSSModule* theQTACCESSmodule = new QTSSModule("QTSSAccessModule"); |
| 688 | 692 | (void)theQTACCESSmodule->SetupModule(&sCallbacks, &QTSSAccessModule_Main); |
diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/Server.tproj/RTPSession.cpp DarwinStreamingSrvr6.0.3-Source/Server.tproj/RTPSession.cpp
|
old
|
new
|
|
| 38 | 38 | #include "RTSPProtocol.h" |
| 39 | 39 | #include "QTSServerInterface.h" |
| 40 | 40 | #include "QTSS.h" |
| 41 | | #include "RTSPRequest3gpp.h" |
| | 41 | #include "RTSPRequest3GPP.h" |
| 42 | 42 | |
| 43 | 43 | #include "OS.h" |
| 44 | 44 | #include "OSMemory.h" |
diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/Server.tproj/RTPStream3gpp.cpp DarwinStreamingSrvr6.0.3-Source/Server.tproj/RTPStream3gpp.cpp
|
old
|
new
|
|
| 34 | 34 | #include "RTPStream.h" |
| 35 | 35 | #include "RTPStream3gpp.h" |
| 36 | 36 | #include "RTPSessionInterface.h" |
| 37 | | #include "RTSPRequest3gpp.h" |
| | 37 | #include "RTSPRequest3GPP.h" |
| 38 | 38 | #include "RTCPAPPNADUPacket.h" |
| 39 | 39 | |
| 40 | 40 | #if DEBUG |
diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/Server.tproj/RTPStream.h DarwinStreamingSrvr6.0.3-Source/Server.tproj/RTPStream.h
|
old
|
new
|
|
| 57 | 57 | |
| 58 | 58 | #include "RTCPPacket.h" |
| 59 | 59 | |
| 60 | | #include "RTSPRequest3gpp.h" |
| | 60 | #include "RTSPRequest3GPP.h" |
| 61 | 61 | |
| 62 | 62 | #ifndef MIN |
| 63 | 63 | #define MIN(a,b) (((a)<(b))?(a):(b)) |
diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/Server.tproj/RTSPRequest3GPP.cpp DarwinStreamingSrvr6.0.3-Source/Server.tproj/RTSPRequest3GPP.cpp
|
old
|
new
|
|
| 32 | 32 | */ |
| 33 | 33 | |
| 34 | 34 | |
| 35 | | #include "RTSPRequest3gpp.h" |
| | 35 | #include "RTSPRequest3GPP.h" |
| 36 | 36 | #include "RTSPProtocol.h" |
| 37 | 37 | #include "QTSServerInterface.h" |
| 38 | 38 | |
diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/StreamingLoadTool/Makefile.POSIX DarwinStreamingSrvr6.0.3-Source/StreamingLoadTool/Makefile.POSIX
|
old
|
new
|
|
| 17 | 17 | CCFLAGS += -I.. |
| 18 | 18 | CCFLAGS += -I../OSMemoryLib |
| 19 | 19 | CCFLAGS += -I../RTSPClientLib |
| | 20 | CCFLAGS += -I../RTCPUtilitiesLib |
| 20 | 21 | CCFLAGS += -I../APICommonCode |
| 21 | 22 | CCFLAGS += -I../CommonUtilitiesLib |
| 22 | 23 | CCFLAGS += -I../PrefsSourceLib |
| … |
… |
|
| 36 | 37 | ../RTSPClientLib/ClientSocket.cpp \ |
| 37 | 38 | ../RTSPClientLib/RTSPClient.cpp \ |
| 38 | 39 | ../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 \ |
| 39 | 46 | ../PrefsSourceLib/FilePrefsSource.cpp \ |
| 40 | 47 | ../APICommonCode/SDPSourceInfo.cpp \ |
| 41 | 48 | ../APICommonCode/SourceInfo.cpp \ |
diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/StreamingLoadTool/StreamingLoadTool.cpp DarwinStreamingSrvr6.0.3-Source/StreamingLoadTool/StreamingLoadTool.cpp
|
old
|
new
|
|
| 743 | 743 | |
| 744 | 744 | bitsReceived += .5; |
| 745 | 745 | |
| 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", |
| 747 | 747 | ClientSession:: GetActiveConnections (), |
| 748 | 748 | ClientSession:: GetPlayingConnections (), |
| 749 | 749 | ClientSession:: GetConnectionAttempts (), |
| … |
… |
|
| 811 | 811 | if (sLog != NULL) |
| 812 | 812 | ::fclose(sLog); |
| 813 | 813 | |
| 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", |
| 815 | 815 | ClientSession:: GetActiveConnections (), |
| 816 | 816 | ClientSession:: GetPlayingConnections (), |
| 817 | 817 | ClientSession:: GetConnectionAttempts (), |