Skip to content

Commit

Permalink
Importing sverker@abrahamsson.com chanegs from dss list, message titl…
Browse files Browse the repository at this point in the history
…ed FW:DSS 6 now available, 26/05/2008 0917AEST

committer: Lincoln Stoll <lstoll@lstoll.net>

--HG--
extra : convert_revision : 3e072096773eac59dc67bea0ae715218fbd3918b
  • Loading branch information
lstoll committed May 26, 2008
1 parent ecc9632 commit 93ed21c
Show file tree
Hide file tree
Showing 13 changed files with 84 additions and 49 deletions.
6 changes: 6 additions & 0 deletions APICommonCode/QTAccessFile.cpp
Expand Up @@ -46,7 +46,9 @@


#include <grp.h>
#ifdef __MacOSX__
#include <membership.h>
#endif
#include <pwd.h>
#include <signal.h>
#include <unistd.h>
Expand Down Expand Up @@ -613,6 +615,7 @@ if (DEBUG_QTACCESS)

bool DSAccessFile::CheckGroupMembership(const char* inUsername, const char* inGroupName)
{
#ifdef __MacOSX__
// In Tiger, group membership is painfully simple: we ask memberd for it!
struct passwd *user = NULL;
struct group *group = NULL;
Expand Down Expand Up @@ -641,6 +644,9 @@ bool DSAccessFile::CheckGroupMembership(const char* inUsername, const char* inGr
if ( mbr_check_membership(userID, groupID, &isMember) )
return false;
return (bool)isMember;
#else
return true;
#endif
}

Bool16 DSAccessFile::ValidUser( char*userName, void* extraDataPtr)
Expand Down
35 changes: 21 additions & 14 deletions CommonUtilitiesLib/OSHeaders.h
Expand Up @@ -120,17 +120,20 @@


#elif __linux__ || __linuxppc__ || __FreeBSD__

/* Defines */
#define _64BITARG_ "q"
#define _S64BITARG_ "lld"
#define _U64BITARG_ "llu"
#if __LP64__
#define _S32BITARG_ "d"
#define _U32BITARG_ "u"
#define _SPOINTERSIZEARG_ _S64BITARG_
#define _UPOINTERSIZEARG_ _U64BITARG_
#else
#define _S32BITARG_ "ld"
#define _U32BITARG_ "lu"
#define _S32BITARG_ "d"
#define _U32BITARG_ "u"
#define _SPOINTERSIZEARG_ _S32BITARG_
#define _UPOINTERSIZEARG_ _U32BITARG_
#endif

/* paths */
Expand All @@ -141,6 +144,7 @@

/* Includes */
#include <sys/types.h>
#include <stdint.h>

/* Constants */
#define QT_TIME_TO_LOCAL_TIME (-2082844800)
Expand All @@ -149,14 +153,14 @@
/* Typedefs */
typedef signed long PointerSizedInt;
typedef unsigned long PointerSizedUInt;
typedef unsigned char UInt8;
typedef signed char SInt8;
typedef unsigned short UInt16;
typedef signed short SInt16;
typedef unsigned int UInt32;
typedef signed int SInt32;
typedef signed int int SInt64;
typedef unsigned int int UInt64;
typedef uint8_t UInt8;
typedef int8_t SInt8;
typedef uint16_t UInt16;
typedef int16_t SInt16;
typedef uint32_t UInt32;
typedef int32_t SInt32;
typedef int64_t SInt64;
typedef uint64_t UInt64;
typedef float Float32;
typedef double Float64;
typedef UInt16 Bool16;
Expand All @@ -177,11 +181,14 @@

#define TW0_CHARS_TO_INT( c1, c2 ) ( c1 << 8 | c2 )

#define kSInt16_Max USHRT_MAX
#define kUInt16_Max USHRT_MAX

#define kSInt32_Max LONG_MAX
#define kUInt32_Max ULONG_MAX




#define kSInt64_Max LONG_LONG_MAX
#define kUInt64_Max ULONG_LONG_MAX

#elif __Win32__

Expand Down
1 change: 1 addition & 0 deletions CommonUtilitiesLib/OSRef.h
Expand Up @@ -45,6 +45,7 @@
#include "StrPtrLen.h"
#include "OSHashTable.h"
#include "OSCond.h"
#include "OSHeaders.h"

class OSRefKey;

Expand Down
58 changes: 32 additions & 26 deletions Makefile.POSIX
Expand Up @@ -42,7 +42,6 @@ CCFLAGS += -IHTTPUtilitiesLib
CCFLAGS += -IRTPMetaInfoLib
CCFLAGS += -IPrefsSourceLib
CCFLAGS += -IServer.tproj

# EACH DIRECTORY WITH A STATIC LIBRARY MUST BE APPENDED IN THIS MANNER TO THE LINKOPTS

LINKOPTS = -LCommonUtilitiesLib
Expand All @@ -52,56 +51,63 @@ C++FLAGS = $(CCFLAGS)

CFILES = CommonUtilitiesLib/daemon.c

CPPFILES = Server.tproj/QTSSExpirationDate.cpp\
CPPFILES = Server.tproj/GenerateXMLPrefs.cpp \
Server.tproj/main.cpp \
Server.tproj/QTSSCallbacks.cpp \
Server.tproj/QTSSDictionary.cpp\
Server.tproj/QTSSDataConverter.cpp \
Server.tproj/QTSSDictionary.cpp \
Server.tproj/QTSSErrorLogModule.cpp \
Server.tproj/QTSSMessages.cpp\
Server.tproj/QTSServer.cpp \
Server.tproj/QTSServerInterface.cpp \
Server.tproj/QTSServerPrefs.cpp \
Server.tproj/QTSSExpirationDate.cpp \
Server.tproj/QTSSFile.cpp \
Server.tproj/QTSSMessages.cpp \
Server.tproj/QTSSModule.cpp \
Server.tproj/QTSServerPrefs.cpp\
Server.tproj/QTSSSocket.cpp\
Server.tproj/QTSSFile.cpp\
Server.tproj/QTSSPrefs.cpp \
Server.tproj/QTSServer.cpp\
Server.tproj/QTSServerInterface.cpp \
Server.tproj/RTCPTask.cpp\
Server.tproj/RTPSession.cpp \
Server.tproj/RTPPacketResender.cpp \
Server.tproj/QTSSSocket.cpp \
Server.tproj/QTSSUserProfile.cpp \
Server.tproj/RTCPTask.cpp \
Server.tproj/RTPBandwidthTracker.cpp \
Server.tproj/RTPOverbufferWindow.cpp \
Server.tproj/RTPSessionInterface.cpp\
Server.tproj/RTPPacketResender.cpp \
Server.tproj/RTPSession3GPP.cpp \
Server.tproj/RTPSession.cpp \
Server.tproj/RTPSessionInterface.cpp \
Server.tproj/RTPStream3gpp.cpp \
Server.tproj/RTPStream.cpp \
Server.tproj/RTSPProtocol.cpp\
Server.tproj/RTSPProtocol.cpp \
Server.tproj/RTSPRequest3GPP.cpp \
Server.tproj/RTSPRequest.cpp \
Server.tproj/RTSPRequestInterface.cpp\
Server.tproj/RTSPRequestInterface.cpp \
Server.tproj/RTSPRequestStream.cpp \
Server.tproj/RTSPResponseStream.cpp\
Server.tproj/RTSPResponseStream.cpp \
Server.tproj/RTSPSession3GPP.cpp \
Server.tproj/RTSPSession.cpp \
Server.tproj/RTSPSessionInterface.cpp\
Server.tproj/main.cpp \
Server.tproj/RTSPSessionInterface.cpp \
Server.tproj/RunServer.cpp \
Server.tproj/GenerateXMLPrefs.cpp \
Server.tproj/QTSSUserProfile.cpp\
PrefsSourceLib/FilePrefsSource.cpp\
PrefsSourceLib/FilePrefsSource.cpp \
PrefsSourceLib/XMLPrefsParser.cpp \
PrefsSourceLib/XMLParser.cpp \
OSMemoryLib/OSMemory.cpp \
RTSPClientLib/RTSPClient.cpp \
RTSPClientLib/ClientSocket.cpp \
HTTPUtilitiesLib/HTTPProtocol.cpp \
HTTPUtilitiesLib/HTTPRequest.cpp \
RTCPUtilitiesLib/RTCPAPPPacket.cpp\
RTCPUtilitiesLib/RTCPAckPacket.cpp \
RTCPUtilitiesLib/RTCPAPPNADUPacket.cpp \
RTCPUtilitiesLib/RTCPAPPPacket.cpp \
RTCPUtilitiesLib/RTCPAPPQTSSPacket.cpp \
RTCPUtilitiesLib/RTCPPacket.cpp \
RTCPUtilitiesLib/RTCPSRPacket.cpp\
RTCPUtilitiesLib/RTCPAckPacket.cpp\
RTPMetaInfoLib/RTPMetaInfoPacket.cpp\
RTCPUtilitiesLib/RTCPSRPacket.cpp \
RTPMetaInfoLib/RTPMetaInfoPacket.cpp \
APIStubLib/QTSS_Private.cpp \
APICommonCode/QTSSModuleUtils.cpp\
APICommonCode/QTSSRollingLog.cpp \
APICommonCode/SDPSourceInfo.cpp \
APICommonCode/SourceInfo.cpp \
APICommonCode/QTAccessFile.cpp \
APICommonCode/QTSS3GPPModuleUtils.cpp \
SafeStdLib/InternalStdLib.cpp \
APIModules/QTSSAccessLogModule/QTSSAccessLogModule.cpp \
APIModules/QTSSFileModule/QTSSFileModule.cpp \
Expand Down Expand Up @@ -129,7 +135,7 @@ CPPFILES = Server.tproj/QTSSExpirationDate.cpp\
APIModules/QTSSAccessModule/QTSSAccessModule.cpp \
APIModules/QTSSHttpFileModule/QTSSHttpFileModule.cpp \
APIModules/QTSSAccessModule/AccessChecker.cpp

# CCFLAGS += $(foreach dir,$(HDRS),-I$(dir))

LIBFILES = QTFileLib/libQTFileLib.a \
Expand Down
2 changes: 1 addition & 1 deletion RTSPClientLib/PlayerSimulator.h
Expand Up @@ -31,7 +31,7 @@
#ifndef _PLAYERSIMULATOR_H_
#define _PLAYERSIMULATOR_H_

#include "SafeStdLib.h""
#include "SafeStdLib.h"
#include "OSHeaders.h"
#include "OS.h"
#include "SVector.h"
Expand Down
6 changes: 5 additions & 1 deletion Server.tproj/QTSSErrorLogModule.cpp
Expand Up @@ -265,7 +265,11 @@ QTSS_Error LogError(QTSS_RoleParamPtr inParamBlock)

sDupErrorStringCount = 0;
}
::strlcpy(sLastErrorString, inParamBlock->errorParams.inBuffer, sizeof(sLastErrorString));
#if __MacOSX__
strlcpy(sLastErrorString, inParamBlock->errorParams.inBuffer, sizeof(sLastErrorString));
#else
strncpy(sLastErrorString, inParamBlock->errorParams.inBuffer, sizeof(sLastErrorString) -1);
#endif

}

Expand Down
6 changes: 5 additions & 1 deletion Server.tproj/QTSServer.cpp
Expand Up @@ -70,7 +70,9 @@
#include "QTSSAdminModule.h"
#include "QTSSAccessModule.h"
#include "QTSSMP3StreamingModule.h"
#if __MacOSX__
#include "QTSSDSAuthModule.h"
#endif
#if MEMORY_DEBUGGING
#include "QTSSWebDebugModule.h"
#endif
Expand All @@ -85,7 +87,7 @@
#include "RTCPTask.h"
#include "QTSSFile.h"

#include "RTPStream3GPP.h"
#include "RTPStream3gpp.h"
#include "RTSPRequest3GPP.h"

// CLASS DEFINITIONS
Expand Down Expand Up @@ -680,9 +682,11 @@ void QTSServer::LoadCompiledInModules()
(void)AddModule(theWebDebug);
#endif

#if __MacOSX__
QTSSModule* theQTSSDSAuthModule = new QTSSModule("QTSSDSAuthModule");
(void)theQTSSDSAuthModule->SetupModule(&sCallbacks, &QTSSDSAuthModule_Main);
(void)AddModule(theQTSSDSAuthModule);
#endif

QTSSModule* theQTACCESSmodule = new QTSSModule("QTSSAccessModule");
(void)theQTACCESSmodule->SetupModule(&sCallbacks, &QTSSAccessModule_Main);
Expand Down
2 changes: 1 addition & 1 deletion Server.tproj/RTPSession.cpp
Expand Up @@ -38,7 +38,7 @@
#include "RTSPProtocol.h"
#include "QTSServerInterface.h"
#include "QTSS.h"
#include "RTSPRequest3gpp.h"
#include "RTSPRequest3GPP.h"

#include "OS.h"
#include "OSMemory.h"
Expand Down
2 changes: 1 addition & 1 deletion Server.tproj/RTPStream.h
Expand Up @@ -57,7 +57,7 @@

#include "RTCPPacket.h"

#include "RTSPRequest3gpp.h"
#include "RTSPRequest3GPP.h"

#ifndef MIN
#define MIN(a,b) (((a)<(b))?(a):(b))
Expand Down
2 changes: 1 addition & 1 deletion Server.tproj/RTPStream3gpp.cpp
Expand Up @@ -34,7 +34,7 @@
#include "RTPStream.h"
#include "RTPStream3gpp.h"
#include "RTPSessionInterface.h"
#include "RTSPRequest3gpp.h"
#include "RTSPRequest3GPP.h"
#include "RTCPAPPNADUPacket.h"

#if DEBUG
Expand Down
2 changes: 1 addition & 1 deletion Server.tproj/RTSPRequest3GPP.cpp
Expand Up @@ -32,7 +32,7 @@
*/


#include "RTSPRequest3gpp.h"
#include "RTSPRequest3GPP.h"
#include "RTSPProtocol.h"
#include "QTSServerInterface.h"

Expand Down
7 changes: 7 additions & 0 deletions StreamingLoadTool/Makefile.POSIX
Expand Up @@ -17,6 +17,7 @@ CCFLAGS += -I.
CCFLAGS += -I..
CCFLAGS += -I../OSMemoryLib
CCFLAGS += -I../RTSPClientLib
CCFLAGS += -I../RTCPUtilitiesLib
CCFLAGS += -I../APICommonCode
CCFLAGS += -I../CommonUtilitiesLib
CCFLAGS += -I../PrefsSourceLib
Expand All @@ -36,6 +37,12 @@ CPPFILES = StreamingLoadTool.cpp \
../RTSPClientLib/ClientSocket.cpp \
../RTSPClientLib/RTSPClient.cpp \
../RTSPClientLib/ClientSession.cpp \
../RTCPUtilitiesLib/RTCPAckPacket.cpp \
../RTCPUtilitiesLib/RTCPAPPNADUPacket.cpp \
../RTCPUtilitiesLib/RTCPAPPPacket.cpp \
../RTCPUtilitiesLib/RTCPAPPQTSSPacket.cpp \
../RTCPUtilitiesLib/RTCPPacket.cpp \
../RTCPUtilitiesLib/RTCPSRPacket.cpp \
../PrefsSourceLib/FilePrefsSource.cpp \
../APICommonCode/SDPSourceInfo.cpp \
../APICommonCode/SourceInfo.cpp \
Expand Down
4 changes: 2 additions & 2 deletions StreamingLoadTool/StreamingLoadTool.cpp
Expand Up @@ -743,7 +743,7 @@ int main(int argc, char *argv[])

bitsReceived += .5;

printf("%5lu %6lu %8lu %6lu %6lu %6lu %9.0fk\n",
printf("%5"_U32BITARG_" %6"_U32BITARG_" %8"_U32BITARG_" %6"_U32BITARG_" %6"_U32BITARG_" %6"_U32BITARG_" %9.0fk\n",
ClientSession:: GetActiveConnections (),
ClientSession:: GetPlayingConnections (),
ClientSession:: GetConnectionAttempts (),
Expand Down Expand Up @@ -811,7 +811,7 @@ int main(int argc, char *argv[])
if (sLog != NULL)
::fclose(sLog);

printf("%5lu %6lu %8lu %6lu %6lu %6lu %9.0fk\n",
printf("%5"_U32BITARG_" %6"_U32BITARG_" %8"_U32BITARG_" %6"_U32BITARG_" %6"_U32BITARG_" %6"_U32BITARG_" %9.0fk\n",
ClientSession:: GetActiveConnections (),
ClientSession:: GetPlayingConnections (),
ClientSession:: GetConnectionAttempts (),
Expand Down

0 comments on commit 93ed21c

Please sign in to comment.