1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-14 23:46:10 +00:00
freebsd-ports/net/rtsp_proxy/files/patch-ac

53 lines
1.5 KiB
Plaintext
Raw Normal View History

--- ../proxy.c Tue Jul 6 17:42:19 1999
+++ ../proxy.c Tue Jul 20 22:26:39 1999
@@ -1142,7 +1142,18 @@
}
//
// did we get a complete response yet?
- if (! has_two_crlfs(s->sinbuf))
+ //
+
+// this used to look for a blank line, which is a dumb way to check if we
+// have a complete response since that only means we have a complete header.
+// the correct method would be to check the 'Content-Length:' header, but
+// that's too much trouble without a lot of re-writing. so this is a cheap
+// hack to look and see if the buffer ends on a 'CRLF' pair - this might get
+// broken if we happen to break on an end-of-line, but it's better than
+// nothing.
+
+ pBuf = s->sinbuf + s->amtInServerInBuffer - 2;
+ if ((pBuf[0] != '\r') || (pBuf[1] != '\n'))
break;
//
--- ../proxy.c.orig Sat Oct 16 10:29:52 1999
+++ ../proxy.c Sat Oct 16 10:30:01 1999
@@ -127,7 +127,9 @@
//int gUDPPortMin = 4000;
//int gUDPPortMax = 65535;
-int gProxyIP = -1;
+#define ANY_ADDRESS -1
+
+int gProxyIP = ANY_ADDRESS;
int gMaxPorts = 0;
unsigned long gBytesReceived = 0;
@@ -137,7 +139,6 @@
unsigned long gLastPacketsReceived = 0;
unsigned long gLastPacketsSent = 0;
-#define ANY_ADDRESS -1
/**********************************************/
#if defined(unix)
@@ -243,7 +244,7 @@
add_rtsp_port_listener(listening_port);
//
- gProxyIP = get_local_ip_address();
+ //gProxyIP = get_local_ip_address();
//
// compile regular expressions for RTSP