diff options
author | mharo <mharo@FreeBSD.org> | 1999-10-26 03:36:54 +0800 |
---|---|---|
committer | mharo <mharo@FreeBSD.org> | 1999-10-26 03:36:54 +0800 |
commit | 8ef2a589b40974e3ae940f063c80358ec7312e5d (patch) | |
tree | 97b55a449837087ce18a88e3f5ae7c733ba0c512 /net | |
parent | 7d29eb67e6bf9537b7ff729ae6ee9ccded9ace40 (diff) | |
download | freebsd-ports-graphics-8ef2a589b40974e3ae940f063c80358ec7312e5d.tar.gz freebsd-ports-graphics-8ef2a589b40974e3ae940f063c80358ec7312e5d.tar.zst freebsd-ports-graphics-8ef2a589b40974e3ae940f063c80358ec7312e5d.zip |
improves reliability on various systems
PR: 12949
Submitted by: Richard.Kiss@kalamalka.gizzywump.com
Diffstat (limited to 'net')
-rw-r--r-- | net/rtsp_proxy/files/patch-ac | 22 | ||||
-rw-r--r-- | net/rtsp_proxy/files/patch-ad | 29 | ||||
-rw-r--r-- | net/rtsp_proxy/files/patch-ae | 16 |
3 files changed, 67 insertions, 0 deletions
diff --git a/net/rtsp_proxy/files/patch-ac b/net/rtsp_proxy/files/patch-ac index 464163b63c2..459a4e85813 100644 --- a/net/rtsp_proxy/files/patch-ac +++ b/net/rtsp_proxy/files/patch-ac @@ -1,3 +1,25 @@ +--- ../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 @@ diff --git a/net/rtsp_proxy/files/patch-ad b/net/rtsp_proxy/files/patch-ad new file mode 100644 index 00000000000..7a13eb1b400 --- /dev/null +++ b/net/rtsp_proxy/files/patch-ad @@ -0,0 +1,29 @@ +--- ../shared_udp.c Tue Jul 6 17:42:26 1999 ++++ ../shared_udp.c Tue Jul 20 23:54:38 1999 +@@ -259,7 +259,16 @@ + gNextPort++; + if (gNextPort > gUDPPortMax) + gNextPort = gUDPPortMin; +- } while (bind_socket_to_address(skt1, fromIP, port1 = gNextPort++, false) != 0); ++ } while (bind_socket_to_address(skt1, INADDR_ANY, port1 = gNextPort++, false) != 0); ++ ++// i've changed the previous bind and the next one below to bind to any ++// IP number rather than using 'fromIP'. 'fromIP' is obtained from gProxyIP ++// which is in turn obtained from 'get_local_ip_address'. this function ++// gets the current hostname and then resolves that into an address. however, ++// since a proxy server runs on a bridging system with multiple IP addresses, ++// this is as likely as not to return the wrong IP address, which results in ++// the proxy missing all of the traffic from the server. not binding to a ++// specific address is cheap but gets a result. + + if (withSib) { + retry_rtcp: +@@ -271,7 +280,7 @@ + else + goto bail_error; + } +- if (bind_socket_to_address(skt2, fromIP, port2 = gNextPort++, false) != 0) { ++ if (bind_socket_to_address(skt2, INADDR_ANY, port2 = gNextPort++, false) != 0) { + close_socket(skt1); + close_socket(skt2); + skt1 = INVALID_SOCKET; diff --git a/net/rtsp_proxy/files/patch-ae b/net/rtsp_proxy/files/patch-ae new file mode 100644 index 00000000000..71b9f704914 --- /dev/null +++ b/net/rtsp_proxy/files/patch-ae @@ -0,0 +1,16 @@ +--- ../proxy.h Tue Jul 6 17:42:19 1999 ++++ ../proxy.h Tue Jul 20 22:26:39 1999 +@@ -80,7 +80,12 @@ + trans_pb RTCP_C2S_tpb; + } track_info; + +-#define RTSP_SESSION_BUF_SIZE 1024 ++// 1024 is too small for some server messages, so i've up'd this to 2048 ++// instead as the proxy will otherwise truncate the message before sending ++// it on to the client, this will confuse the client no end. ++ ++#define RTSP_SESSION_BUF_SIZE 2048 ++ + typedef struct rtsp_session { + struct rtsp_session *next; + int die; |