1 http://www.abrahamsson.com/dss-6.0.3.patch
3 diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/APICommonCode/QTAccessFile.cpp DarwinStreamingSrvr6.0.3-Source/APICommonCode/QTAccessFile.cpp
4 --- DarwinStreamingSrvr6.0.3-Source.orig/APICommonCode/QTAccessFile.cpp 2008-05-06 01:28:57.000000000 +0200
5 +++ DarwinStreamingSrvr6.0.3-Source/APICommonCode/QTAccessFile.cpp 2008-05-24 03:23:13.000000000 +0200
11 #include <membership.h>
18 bool DSAccessFile::CheckGroupMembership(const char* inUsername, const char* inGroupName)
21 // In Tiger, group membership is painfully simple: we ask memberd for it!
22 struct passwd *user = NULL;
23 struct group *group = NULL;
25 if ( mbr_check_membership(userID, groupID, &isMember) )
27 return (bool)isMember;
33 Bool16 DSAccessFile::ValidUser( char*userName, void* extraDataPtr)
34 diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/CommonUtilitiesLib/OSHeaders.h DarwinStreamingSrvr6.0.3-Source/CommonUtilitiesLib/OSHeaders.h
35 --- DarwinStreamingSrvr6.0.3-Source.orig/CommonUtilitiesLib/OSHeaders.h 2008-05-06 01:28:59.000000000 +0200
36 +++ DarwinStreamingSrvr6.0.3-Source/CommonUtilitiesLib/OSHeaders.h 2008-05-24 02:05:15.000000000 +0200
40 #elif __linux__ || __linuxppc__ || __FreeBSD__
43 #define _64BITARG_ "q"
44 #define _S64BITARG_ "lld"
47 #define _S32BITARG_ "d"
48 #define _U32BITARG_ "u"
49 + #define _SPOINTERSIZEARG_ _S64BITARG_
50 + #define _UPOINTERSIZEARG_ _U64BITARG_
52 - #define _S32BITARG_ "ld"
53 - #define _U32BITARG_ "lu"
54 + #define _S32BITARG_ "d"
55 + #define _U32BITARG_ "u"
56 + #define _SPOINTERSIZEARG_ _S32BITARG_
57 + #define _UPOINTERSIZEARG_ _U32BITARG_
64 #include <sys/types.h>
68 #define QT_TIME_TO_LOCAL_TIME (-2082844800)
71 typedef signed long PointerSizedInt;
72 typedef unsigned long PointerSizedUInt;
73 - typedef unsigned char UInt8;
74 - typedef signed char SInt8;
75 - typedef unsigned short UInt16;
76 - typedef signed short SInt16;
77 - typedef unsigned int UInt32;
78 - typedef signed int SInt32;
79 - typedef signed int int SInt64;
80 - typedef unsigned int int UInt64;
81 + typedef uint8_t UInt8;
82 + typedef int8_t SInt8;
83 + typedef uint16_t UInt16;
84 + typedef int16_t SInt16;
85 + typedef uint32_t UInt32;
86 + typedef int32_t SInt32;
87 + typedef int64_t SInt64;
88 + typedef uint64_t UInt64;
89 typedef float Float32;
90 typedef double Float64;
91 typedef UInt16 Bool16;
94 #define TW0_CHARS_TO_INT( c1, c2 ) ( c1 << 8 | c2 )
96 + #define kSInt16_Max USHRT_MAX
97 + #define kUInt16_Max USHRT_MAX
99 + #define kSInt32_Max LONG_MAX
100 + #define kUInt32_Max ULONG_MAX
105 + #define kSInt64_Max LONG_LONG_MAX
106 + #define kUInt64_Max ULONG_LONG_MAX
110 diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/CommonUtilitiesLib/OSRef.h DarwinStreamingSrvr6.0.3-Source/CommonUtilitiesLib/OSRef.h
111 --- DarwinStreamingSrvr6.0.3-Source.orig/CommonUtilitiesLib/OSRef.h 2008-05-06 01:28:59.000000000 +0200
112 +++ DarwinStreamingSrvr6.0.3-Source/CommonUtilitiesLib/OSRef.h 2008-05-23 22:28:51.000000000 +0200
114 #include "StrPtrLen.h"
115 #include "OSHashTable.h"
117 +#include "OSHeaders.h"
121 diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/Makefile.POSIX DarwinStreamingSrvr6.0.3-Source/Makefile.POSIX
122 --- DarwinStreamingSrvr6.0.3-Source.orig/Makefile.POSIX 2007-11-16 06:17:59.000000000 +0100
123 +++ DarwinStreamingSrvr6.0.3-Source/Makefile.POSIX 2008-05-24 07:19:34.000000000 +0200
125 CCFLAGS += -IRTPMetaInfoLib
126 CCFLAGS += -IPrefsSourceLib
127 CCFLAGS += -IServer.tproj
129 # EACH DIRECTORY WITH A STATIC LIBRARY MUST BE APPENDED IN THIS MANNER TO THE LINKOPTS
131 LINKOPTS = -LCommonUtilitiesLib
134 CFILES = CommonUtilitiesLib/daemon.c
136 -CPPFILES = Server.tproj/QTSSExpirationDate.cpp\
137 +CPPFILES = Server.tproj/GenerateXMLPrefs.cpp \
138 + Server.tproj/main.cpp \
139 Server.tproj/QTSSCallbacks.cpp \
140 - Server.tproj/QTSSDictionary.cpp\
141 Server.tproj/QTSSDataConverter.cpp \
142 + Server.tproj/QTSSDictionary.cpp \
143 Server.tproj/QTSSErrorLogModule.cpp \
144 - Server.tproj/QTSSMessages.cpp\
145 + Server.tproj/QTSServer.cpp \
146 + Server.tproj/QTSServerInterface.cpp \
147 + Server.tproj/QTSServerPrefs.cpp \
148 + Server.tproj/QTSSExpirationDate.cpp \
149 + Server.tproj/QTSSFile.cpp \
150 + Server.tproj/QTSSMessages.cpp \
151 Server.tproj/QTSSModule.cpp \
152 - Server.tproj/QTSServerPrefs.cpp\
153 - Server.tproj/QTSSSocket.cpp\
154 - Server.tproj/QTSSFile.cpp\
155 Server.tproj/QTSSPrefs.cpp \
156 - Server.tproj/QTSServer.cpp\
157 - Server.tproj/QTSServerInterface.cpp \
158 - Server.tproj/RTCPTask.cpp\
159 - Server.tproj/RTPSession.cpp \
160 - Server.tproj/RTPPacketResender.cpp \
161 + Server.tproj/QTSSSocket.cpp \
162 + Server.tproj/QTSSUserProfile.cpp \
163 + Server.tproj/RTCPTask.cpp \
164 Server.tproj/RTPBandwidthTracker.cpp \
165 Server.tproj/RTPOverbufferWindow.cpp \
166 - Server.tproj/RTPSessionInterface.cpp\
167 + Server.tproj/RTPPacketResender.cpp \
168 + Server.tproj/RTPSession3GPP.cpp \
169 + Server.tproj/RTPSession.cpp \
170 + Server.tproj/RTPSessionInterface.cpp \
171 + Server.tproj/RTPStream3gpp.cpp \
172 Server.tproj/RTPStream.cpp \
173 - Server.tproj/RTSPProtocol.cpp\
174 + Server.tproj/RTSPProtocol.cpp \
175 + Server.tproj/RTSPRequest3GPP.cpp \
176 Server.tproj/RTSPRequest.cpp \
177 - Server.tproj/RTSPRequestInterface.cpp\
178 + Server.tproj/RTSPRequestInterface.cpp \
179 Server.tproj/RTSPRequestStream.cpp \
180 - Server.tproj/RTSPResponseStream.cpp\
181 + Server.tproj/RTSPResponseStream.cpp \
182 + Server.tproj/RTSPSession3GPP.cpp \
183 Server.tproj/RTSPSession.cpp \
184 - Server.tproj/RTSPSessionInterface.cpp\
185 - Server.tproj/main.cpp \
186 + Server.tproj/RTSPSessionInterface.cpp \
187 Server.tproj/RunServer.cpp \
188 - Server.tproj/GenerateXMLPrefs.cpp \
189 - Server.tproj/QTSSUserProfile.cpp\
190 - PrefsSourceLib/FilePrefsSource.cpp\
191 + PrefsSourceLib/FilePrefsSource.cpp \
192 PrefsSourceLib/XMLPrefsParser.cpp \
193 PrefsSourceLib/XMLParser.cpp \
194 OSMemoryLib/OSMemory.cpp \
196 RTSPClientLib/ClientSocket.cpp \
197 HTTPUtilitiesLib/HTTPProtocol.cpp \
198 HTTPUtilitiesLib/HTTPRequest.cpp \
199 - RTCPUtilitiesLib/RTCPAPPPacket.cpp\
200 + RTCPUtilitiesLib/RTCPAckPacket.cpp \
201 + RTCPUtilitiesLib/RTCPAPPNADUPacket.cpp \
202 + RTCPUtilitiesLib/RTCPAPPPacket.cpp \
203 + RTCPUtilitiesLib/RTCPAPPQTSSPacket.cpp \
204 RTCPUtilitiesLib/RTCPPacket.cpp \
205 - RTCPUtilitiesLib/RTCPSRPacket.cpp\
206 - RTCPUtilitiesLib/RTCPAckPacket.cpp\
207 - RTPMetaInfoLib/RTPMetaInfoPacket.cpp\
208 + RTCPUtilitiesLib/RTCPSRPacket.cpp \
209 + RTPMetaInfoLib/RTPMetaInfoPacket.cpp \
210 APIStubLib/QTSS_Private.cpp \
211 APICommonCode/QTSSModuleUtils.cpp\
212 APICommonCode/QTSSRollingLog.cpp \
213 APICommonCode/SDPSourceInfo.cpp \
214 APICommonCode/SourceInfo.cpp \
215 APICommonCode/QTAccessFile.cpp \
216 + APICommonCode/QTSS3GPPModuleUtils.cpp \
217 SafeStdLib/InternalStdLib.cpp \
218 APIModules/QTSSAccessLogModule/QTSSAccessLogModule.cpp \
219 APIModules/QTSSFileModule/QTSSFileModule.cpp \
221 APIModules/QTSSAccessModule/QTSSAccessModule.cpp \
222 APIModules/QTSSHttpFileModule/QTSSHttpFileModule.cpp \
223 APIModules/QTSSAccessModule/AccessChecker.cpp
226 # CCFLAGS += $(foreach dir,$(HDRS),-I$(dir))
228 LIBFILES = QTFileLib/libQTFileLib.a \
229 diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/RTSPClientLib/PlayerSimulator.h DarwinStreamingSrvr6.0.3-Source/RTSPClientLib/PlayerSimulator.h
230 --- DarwinStreamingSrvr6.0.3-Source.orig/RTSPClientLib/PlayerSimulator.h 2008-05-06 01:29:00.000000000 +0200
231 +++ DarwinStreamingSrvr6.0.3-Source/RTSPClientLib/PlayerSimulator.h 2008-05-24 02:08:45.000000000 +0200
233 #ifndef _PLAYERSIMULATOR_H_
234 #define _PLAYERSIMULATOR_H_
236 -#include "SafeStdLib.h""
237 +#include "SafeStdLib.h"
238 #include "OSHeaders.h"
241 diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/Server.tproj/QTSSErrorLogModule.cpp DarwinStreamingSrvr6.0.3-Source/Server.tproj/QTSSErrorLogModule.cpp
242 --- DarwinStreamingSrvr6.0.3-Source.orig/Server.tproj/QTSSErrorLogModule.cpp 2008-05-06 01:28:59.000000000 +0200
243 +++ DarwinStreamingSrvr6.0.3-Source/Server.tproj/QTSSErrorLogModule.cpp 2008-05-24 02:58:48.000000000 +0200
246 sDupErrorStringCount = 0;
248 - ::strlcpy(sLastErrorString, inParamBlock->errorParams.inBuffer, sizeof(sLastErrorString));
250 + strlcpy(sLastErrorString, inParamBlock->errorParams.inBuffer, sizeof(sLastErrorString));
252 + strncpy(sLastErrorString, inParamBlock->errorParams.inBuffer, sizeof(sLastErrorString) -1);
257 diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/Server.tproj/QTSServer.cpp DarwinStreamingSrvr6.0.3-Source/Server.tproj/QTSServer.cpp
258 --- DarwinStreamingSrvr6.0.3-Source.orig/Server.tproj/QTSServer.cpp 2008-05-06 01:28:59.000000000 +0200
259 +++ DarwinStreamingSrvr6.0.3-Source/Server.tproj/QTSServer.cpp 2008-05-24 07:24:39.000000000 +0200
261 #include "QTSSAdminModule.h"
262 #include "QTSSAccessModule.h"
263 #include "QTSSMP3StreamingModule.h"
265 #include "QTSSDSAuthModule.h"
268 #include "QTSSWebDebugModule.h"
271 #include "RTCPTask.h"
272 #include "QTSSFile.h"
274 -#include "RTPStream3GPP.h"
275 +#include "RTPStream3gpp.h"
276 #include "RTSPRequest3GPP.h"
280 (void)AddModule(theWebDebug);
284 QTSSModule* theQTSSDSAuthModule = new QTSSModule("QTSSDSAuthModule");
285 (void)theQTSSDSAuthModule->SetupModule(&sCallbacks, &QTSSDSAuthModule_Main);
286 (void)AddModule(theQTSSDSAuthModule);
289 QTSSModule* theQTACCESSmodule = new QTSSModule("QTSSAccessModule");
290 (void)theQTACCESSmodule->SetupModule(&sCallbacks, &QTSSAccessModule_Main);
291 diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/Server.tproj/RTPSession.cpp DarwinStreamingSrvr6.0.3-Source/Server.tproj/RTPSession.cpp
292 --- DarwinStreamingSrvr6.0.3-Source.orig/Server.tproj/RTPSession.cpp 2008-05-06 01:28:59.000000000 +0200
293 +++ DarwinStreamingSrvr6.0.3-Source/Server.tproj/RTPSession.cpp 2008-05-24 02:39:34.000000000 +0200
295 #include "RTSPProtocol.h"
296 #include "QTSServerInterface.h"
298 -#include "RTSPRequest3gpp.h"
299 +#include "RTSPRequest3GPP.h"
302 #include "OSMemory.h"
303 diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/Server.tproj/RTPStream3gpp.cpp DarwinStreamingSrvr6.0.3-Source/Server.tproj/RTPStream3gpp.cpp
304 --- DarwinStreamingSrvr6.0.3-Source.orig/Server.tproj/RTPStream3gpp.cpp 2008-05-06 01:28:59.000000000 +0200
305 +++ DarwinStreamingSrvr6.0.3-Source/Server.tproj/RTPStream3gpp.cpp 2008-05-24 02:48:52.000000000 +0200
307 #include "RTPStream.h"
308 #include "RTPStream3gpp.h"
309 #include "RTPSessionInterface.h"
310 -#include "RTSPRequest3gpp.h"
311 +#include "RTSPRequest3GPP.h"
312 #include "RTCPAPPNADUPacket.h"
315 diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/Server.tproj/RTPStream.h DarwinStreamingSrvr6.0.3-Source/Server.tproj/RTPStream.h
316 --- DarwinStreamingSrvr6.0.3-Source.orig/Server.tproj/RTPStream.h 2008-05-06 01:28:59.000000000 +0200
317 +++ DarwinStreamingSrvr6.0.3-Source/Server.tproj/RTPStream.h 2008-05-24 02:36:24.000000000 +0200
320 #include "RTCPPacket.h"
322 -#include "RTSPRequest3gpp.h"
323 +#include "RTSPRequest3GPP.h"
326 #define MIN(a,b) (((a)<(b))?(a):(b))
327 diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/Server.tproj/RTSPRequest3GPP.cpp DarwinStreamingSrvr6.0.3-Source/Server.tproj/RTSPRequest3GPP.cpp
328 --- DarwinStreamingSrvr6.0.3-Source.orig/Server.tproj/RTSPRequest3GPP.cpp 2008-05-06 01:28:59.000000000 +0200
329 +++ DarwinStreamingSrvr6.0.3-Source/Server.tproj/RTSPRequest3GPP.cpp 2008-05-24 02:49:26.000000000 +0200
334 -#include "RTSPRequest3gpp.h"
335 +#include "RTSPRequest3GPP.h"
336 #include "RTSPProtocol.h"
337 #include "QTSServerInterface.h"
339 diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/StreamingLoadTool/Makefile.POSIX DarwinStreamingSrvr6.0.3-Source/StreamingLoadTool/Makefile.POSIX
340 --- DarwinStreamingSrvr6.0.3-Source.orig/StreamingLoadTool/Makefile.POSIX 2007-11-16 06:17:36.000000000 +0100
341 +++ DarwinStreamingSrvr6.0.3-Source/StreamingLoadTool/Makefile.POSIX 2008-05-24 02:32:03.000000000 +0200
344 CCFLAGS += -I../OSMemoryLib
345 CCFLAGS += -I../RTSPClientLib
346 +CCFLAGS += -I../RTCPUtilitiesLib
347 CCFLAGS += -I../APICommonCode
348 CCFLAGS += -I../CommonUtilitiesLib
349 CCFLAGS += -I../PrefsSourceLib
351 ../RTSPClientLib/ClientSocket.cpp \
352 ../RTSPClientLib/RTSPClient.cpp \
353 ../RTSPClientLib/ClientSession.cpp \
354 + ../RTCPUtilitiesLib/RTCPAckPacket.cpp \
355 + ../RTCPUtilitiesLib/RTCPAPPNADUPacket.cpp \
356 + ../RTCPUtilitiesLib/RTCPAPPPacket.cpp \
357 + ../RTCPUtilitiesLib/RTCPAPPQTSSPacket.cpp \
358 + ../RTCPUtilitiesLib/RTCPPacket.cpp \
359 + ../RTCPUtilitiesLib/RTCPSRPacket.cpp \
360 ../PrefsSourceLib/FilePrefsSource.cpp \
361 ../APICommonCode/SDPSourceInfo.cpp \
362 ../APICommonCode/SourceInfo.cpp \
363 diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/StreamingLoadTool/StreamingLoadTool.cpp DarwinStreamingSrvr6.0.3-Source/StreamingLoadTool/StreamingLoadTool.cpp
364 --- DarwinStreamingSrvr6.0.3-Source.orig/StreamingLoadTool/StreamingLoadTool.cpp 2008-05-06 01:28:57.000000000 +0200
365 +++ DarwinStreamingSrvr6.0.3-Source/StreamingLoadTool/StreamingLoadTool.cpp 2008-05-24 02:22:13.000000000 +0200
370 - printf("%5lu %6lu %8lu %6lu %6lu %6lu %9.0fk\n",
371 + printf("%5"_U32BITARG_" %6"_U32BITARG_" %8"_U32BITARG_" %6"_U32BITARG_" %6"_U32BITARG_" %6"_U32BITARG_" %9.0fk\n",
372 ClientSession:: GetActiveConnections (),
373 ClientSession:: GetPlayingConnections (),
374 ClientSession:: GetConnectionAttempts (),
379 - printf("%5lu %6lu %8lu %6lu %6lu %6lu %9.0fk\n",
380 + printf("%5"_U32BITARG_" %6"_U32BITARG_" %8"_U32BITARG_" %6"_U32BITARG_" %6"_U32BITARG_" %6"_U32BITARG_" %9.0fk\n",
381 ClientSession:: GetActiveConnections (),
382 ClientSession:: GetPlayingConnections (),
383 ClientSession:: GetConnectionAttempts (),