Commit 308924a1 authored by Jean-Paul Saman's avatar Jean-Paul Saman

Update patches to latest live tarball.

parent b760414f
diff -x Makefile -uN live/config.armlinux live.new/config.armlinux
--- live/config.armlinux 2007-02-20 12:33:45.000000000 +0100
+++ live.new/config.armlinux 2007-02-22 09:34:34.000000000 +0100
@@ -1,5 +1,5 @@
CROSS_COMPILE= arm-elf-
-COMPILE_OPTS = $(INCLUDES) -I. -O2 -DSOCKLEN_T=socklen_t -DNO_STRSTREAM=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64
+COMPILE_OPTS = $(INCLUDES) -I. -O2 -DSOCKLEN_T=socklen_t -DNO_STRSTREAM=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DUSE_SYSTEM_RANDOM=1
C = c
C_COMPILER = $(CROSS_COMPILE)gcc
C_FLAGS = $(COMPILE_OPTS)
diff -x Makefile -uN live/config.cygwin live.new/config.cygwin
--- live/config.cygwin 2007-02-20 12:33:45.000000000 +0100
+++ live.new/config.cygwin 2007-02-22 09:32:20.000000000 +0100
......@@ -90,3 +80,12 @@ diff -x Makefile -uN live/config.uClinux live.new/config.uClinux
C = c
C_COMPILER = $(CC)
CFLAGS += $(COMPILE_OPTS)
--- live/config.armlinux 2007-04-24 11:38:22.000000000 +0200
+++ live.new/config.armlinux 2007-04-28 15:59:33.000000000 +0200
@@ -1,5 +1,5 @@
CROSS_COMPILE= arm-elf-
-COMPILE_OPTS = $(INCLUDES) -I. -O2 -DSOCKLEN_T=socklen_t -DNO_STRSTREAM=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64
+COMPILE_OPTS = $(INCLUDES) -I. -O2 -DSOCKLEN_T=socklen_t -DNO_STRSTREAM=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DUSE_SYSTEM_RANDOM=1
C = c
C_COMPILER = $(CROSS_COMPILE)gcc
C_FLAGS = $(COMPILE_OPTS)
......@@ -22,13 +22,41 @@ diff -ru live/groupsock/NetInterface.cpp live-patched/groupsock/NetInterface.cpp
#endif
////////// NetInterface //////////
--- live/liveMedia/RTSPClient.cpp.orig 2007-04-24 11:38:22.000000000 +0200
+++ live/liveMedia/RTSPClient.cpp 2007-04-28 14:01:53.000000000 +0200
@@ -28,6 +28,25 @@
--- live/liveMedia/RTSPClient.cpp 2007-04-24 11:38:22.000000000 +0200
+++ live-patched/liveMedia/RTSPClient.cpp 2007-04-26 15:19:54.000000000 +0200
@@ -21,13 +21,53 @@
#include "RTSPClient.hh"
#include "RTSPCommon.hh"
#include "Base64.hh"
-#include "Locale.hh"
#include <GroupsockHelper.hh>
#include "our_md5.h"
#ifdef SUPPORT_REAL_RTSP
#include "../RealRTSP/include/RealRTSP.hh"
#endif
+#include <locale.h>
+#include <stdarg.h>
+/* Radix safe (always uses .) printf and friends */
+int radix_safe_sprintf( char *str, const char *format, ...)
+{
+ va_list args;
+ int result = 0;
+ char *locale = NULL;
+
+ locale = strDup( setlocale( LC_NUMERIC, NULL ) );
+ setlocale( LC_NUMERIC, "C" );
+
+ va_start( args, format );
+ result = vsprintf(str, format, args );
+ va_end( args );
+
+ setlocale( LC_NUMERIC, locale );
+ delete[] locale;
+
+ return result;
+}
+
+int radix_safe_sscanf( const char *str, const char *format, ...)
+{
+ va_list args;
......@@ -51,7 +79,7 @@ diff -ru live/groupsock/NetInterface.cpp live-patched/groupsock/NetInterface.cpp
////////// RTSPClient //////////
RTSPClient* RTSPClient::createNew(UsageEnvironment& env,
@@ -989,8 +1008,7 @@
@@ -989,8 +1029,7 @@
// This is the default value; we don't need a "Scale:" header:
buf[0] = '\0';
} else {
......@@ -61,13 +89,13 @@ diff -ru live/groupsock/NetInterface.cpp live-patched/groupsock/NetInterface.cpp
}
return strDup(buf);
@@ -1003,12 +1021,10 @@
@@ -1003,12 +1042,10 @@
buf[0] = '\0';
} else if (end < 0) {
// There's no end time:
- Locale("POSIX", LC_NUMERIC);
- sprintf(buf, "Range: npt=%.3f-\r\n", start);
+ radix_safe_sprintf(buf, "Range: npt=%.3f-%.3f\r\n", start, end);
+ radix_safe_sprintf(buf, "Range: npt=%.3f-\r\n", start);
} else {
// There's both a start and an end time; include them both in the "Range:" hdr
- Locale("POSIX", LC_NUMERIC);
......@@ -76,13 +104,13 @@ diff -ru live/groupsock/NetInterface.cpp live-patched/groupsock/NetInterface.cpp
}
return strDup(buf);
@@ -2246,8 +2262,7 @@
@@ -2246,8 +2283,7 @@
if (_strncasecmp(line, "Scale: ", 7) != 0) return False;
line += 7;
- Locale("POSIX", LC_NUMERIC);
- return sscanf(line, "%f", &scale) == 1;
+ return radix_safe_sscanf(line, "%f", &scale) == 1;
+ return radix_safe_sscanf(line, "%f", &scale) == 1;
}
Boolean RTSPClient::parseGetParameterHeader(char const* line,
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment