Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
07cba77d
Commit
07cba77d
authored
Nov 22, 2010
by
Konstantin Pavlov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Contribs: update live-inet_ntop patch.
parent
5f25bf9f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
65 deletions
+37
-65
extras/contrib/src/Patches/live-inet_ntop.patch
extras/contrib/src/Patches/live-inet_ntop.patch
+37
-65
No files found.
extras/contrib/src/Patches/live-inet_ntop.patch
View file @
07cba77d
Copyright (C) 2010 Rémi Denis-Courmont.
Licensed under GNU General Public License version 2 or higher.
diff -ru live.orig/groupsock/Groupsock.cpp live/groupsock/Groupsock.cpp
--- live.orig/groupsock/Groupsock.cpp 2010-
05-30 01:20:31.000000000 +03
00
+++ live/groupsock/Groupsock.cpp 2010-
06-06 00:34:03.000000000 +03
00
@@ -33
1,8 +331
,10 @@
--- live.orig/groupsock/Groupsock.cpp 2010-
10-20 10:31:13.000000000 +02
00
+++ live/groupsock/Groupsock.cpp 2010-
10-20 12:34:04.762178010 +02
00
@@ -33
5,8 +335
,10 @@
}
}
if (DebugLevel >= 3) {
...
...
@@ -15,7 +15,7 @@ diff -ru live.orig/groupsock/Groupsock.cpp live/groupsock/Groupsock.cpp
if (numMembers > 0) {
env() << "; relayed to " << numMembers << " members";
}
@@ -44
1,13 +443
,14 @@
@@ -44
5,13 +447
,14 @@
}
UsageEnvironment& operator<<(UsageEnvironment& s, const Groupsock& g) {
...
...
@@ -33,9 +33,9 @@ diff -ru live.orig/groupsock/Groupsock.cpp live/groupsock/Groupsock.cpp
return s1 << (unsigned)(g.ttl()) << ")";
}
diff -ru live.orig/groupsock/include/GroupsockHelper.hh live/groupsock/include/GroupsockHelper.hh
--- live.orig/groupsock/include/GroupsockHelper.hh 2010-
05-30 01:20:31.000000000 +03
00
+++ live/groupsock/include/GroupsockHelper.hh 2010-
06-06 00:34:03.000000000 +03
00
@@ -1
24,7 +124
,7 @@
--- live.orig/groupsock/include/GroupsockHelper.hh 2010-
10-20 10:31:13.000000000 +02
00
+++ live/groupsock/include/GroupsockHelper.hh 2010-
10-20 12:34:04.762178010 +02
00
@@ -1
16,7 +116
,7 @@
// The following are implemented in inet.c:
extern "C" netAddressBits our_inet_addr(char const*);
...
...
@@ -45,8 +45,8 @@ diff -ru live.orig/groupsock/include/GroupsockHelper.hh live/groupsock/include/G
extern "C" void our_srandom(int x);
extern "C" long our_random();
diff -ru live.orig/groupsock/inet.c live/groupsock/inet.c
--- live.orig/groupsock/inet.c 2010-
05-30 01:20:31.000000000 +03
00
+++ live/groupsock/inet.c 2010-
06-06 00:39:12.000000000 +03
00
--- live.orig/groupsock/inet.c 2010-
10-20 10:31:13.000000000 +02
00
+++ live/groupsock/inet.c 2010-
10-20 12:34:04.762178010 +02
00
@@ -21,26 +21,19 @@
}
...
...
@@ -86,9 +86,9 @@ diff -ru live.orig/groupsock/inet.c live/groupsock/inet.c
return(result);
#endif
diff -ru live.orig/liveMedia/DarwinInjector.cpp live/liveMedia/DarwinInjector.cpp
--- live.orig/liveMedia/DarwinInjector.cpp 2010-
05-30 01:20:31.000000000 +03
00
+++ live/liveMedia/DarwinInjector.cpp 2010-
06-06 00:34:03.000000000 +03
00
@@ -1
28,7 +128
,8 @@
--- live.orig/liveMedia/DarwinInjector.cpp 2010-
10-20 10:31:13.000000000 +02
00
+++ live/liveMedia/DarwinInjector.cpp 2010-
10-20 12:34:04.762178010 +02
00
@@ -1
46,7 +146
,8 @@
NetAddress const* address = addresses.firstAddress();
addr.s_addr = *(unsigned*)(address->data());
}
...
...
@@ -99,8 +99,8 @@ diff -ru live.orig/liveMedia/DarwinInjector.cpp live/liveMedia/DarwinInjector.cp
// Construct a SDP description for the session that we'll be streaming:
char const* const sdpFmt =
diff -ru live.orig/liveMedia/OnDemandServerMediaSubsession.cpp live/liveMedia/OnDemandServerMediaSubsession.cpp
--- live.orig/liveMedia/OnDemandServerMediaSubsession.cpp 2010-
05-30 01:20:31.000000000 +03
00
+++ live/liveMedia/OnDemandServerMediaSubsession.cpp 2010-
06-06 00:34:03.000000000 +03
00
--- live.orig/liveMedia/OnDemandServerMediaSubsession.cpp 2010-
10-20 10:31:13.000000000 +02
00
+++ live/liveMedia/OnDemandServerMediaSubsession.cpp 2010-
10-20 12:34:04.762178010 +02
00
@@ -365,7 +365,8 @@
char const* mediaType = rtpSink->sdpMediaType();
unsigned char rtpPayloadType = rtpSink->rtpPayloadType();
...
...
@@ -121,8 +121,8 @@ diff -ru live.orig/liveMedia/OnDemandServerMediaSubsession.cpp live/liveMedia/On
fSDPLines = strDup(sdpLines);
delete[] sdpLines;
diff -ru live.orig/liveMedia/PassiveServerMediaSubsession.cpp live/liveMedia/PassiveServerMediaSubsession.cpp
--- live.orig/liveMedia/PassiveServerMediaSubsession.cpp 2010-
05-30 01:20:31.000000000 +03
00
+++ live/liveMedia/PassiveServerMediaSubsession.cpp 2010-
06-06 00:34:03.000000000 +03
00
--- live.orig/liveMedia/PassiveServerMediaSubsession.cpp 2010-
10-20 10:31:13.000000000 +02
00
+++ live/liveMedia/PassiveServerMediaSubsession.cpp 2010-
10-20 12:34:04.762178010 +02
00
@@ -54,7 +54,8 @@
char const* auxSDPLine = fRTPSink.auxSDPLine();
if (auxSDPLine == NULL) auxSDPLine = "";
...
...
@@ -142,23 +142,10 @@ diff -ru live.orig/liveMedia/PassiveServerMediaSubsession.cpp live/liveMedia/Pas
fSDPLines = strDup(sdpLines);
delete[] sdpLines;
diff -ru live.orig/liveMedia/RTCP.cpp live/liveMedia/RTCP.cpp
--- live.orig/liveMedia/RTCP.cpp 2010-05-30 01:20:31.000000000 +0300
+++ live/liveMedia/RTCP.cpp 2010-06-06 00:34:03.000000000 +0300
@@ -359,7 +359,8 @@
}
#ifdef DEBUG
- fprintf(stderr, "[%p]saw incoming RTCP packet (from address %s, port %d)\n", this, our_inet_ntoa(fromAddress.sin_addr), ntohs(fromAddress.sin_port));
+ char buf[16];
+ fprintf(stderr, "[%p]saw incoming RTCP packet (from address %s, port %d)\n", this, our_inet_ntoa(fromAddress.sin_addr, buf), ntohs(fromAddress.sin_port));
unsigned char* p = pkt;
for (unsigned i = 0; i < packetSize; ++i) {
if (i%4 == 0) fprintf(stderr, " ");
diff -ru live.orig/liveMedia/RTSPClient.cpp live/liveMedia/RTSPClient.cpp
--- live.orig/liveMedia/RTSPClient.cpp 2010-
05-30 01:20:31.000000000 +03
00
+++ live/liveMedia/RTSPClient.cpp 2010-
06-06 00:39:08.000000000 +03
00
@@ -41
5,7 +415
,8 @@
--- live.orig/liveMedia/RTSPClient.cpp 2010-
10-20 12:34:33.662177993 +02
00
+++ live/liveMedia/RTSPClient.cpp 2010-
10-20 12:34:04.762178010 +02
00
@@ -41
1,7 +411
,8 @@
int RTSPClient::connectToServer(int socketNum, portNumBits remotePortNum) {
MAKE_SOCKADDR_IN(remoteName, fServerAddress, htons(remotePortNum));
if (fVerbosityLevel >= 1) {
...
...
@@ -168,26 +155,13 @@ diff -ru live.orig/liveMedia/RTSPClient.cpp live/liveMedia/RTSPClient.cpp
}
if (connect(socketNum, (struct sockaddr*) &remoteName, sizeof remoteName) != 0) {
if (envir().getErrno() == EINPROGRESS) {
diff -ru live.orig/liveMedia/RTSPOverHTTPServer.cpp live/liveMedia/RTSPOverHTTPServer.cpp
--- live.orig/liveMedia/RTSPOverHTTPServer.cpp 2010-05-30 01:20:31.000000000 +0300
+++ live/liveMedia/RTSPOverHTTPServer.cpp 2010-06-06 00:34:03.000000000 +0300
@@ -128,7 +128,8 @@
makeSocketNonBlocking(clientSocket);
increaseSendBufferTo(envir(), clientSocket, 50*1024);
#if defined(DEBUG) || defined(DEBUG_CONNECTIONS)
- fprintf(stderr, "accept()ed connection from %s\n", our_inet_ntoa(clientAddr.sin_addr));
+ char buf[16];
+ fprintf(stderr, "accept()ed connection from %s\n", our_inet_ntoa(clientAddr.sin_addr, buf));
#endif
// Create a new object for handling this HTTP connection:
diff -ru live.orig/liveMedia/RTSPServer.cpp live/liveMedia/RTSPServer.cpp
--- live.orig/liveMedia/RTSPServer.cpp 2010-
05-30 01:20:31.000000000 +03
00
+++ live/liveMedia/RTSPServer.cpp 2010-
06-06 00:34:03.000000000 +03
00
@@ -11
2,11 +112
,12 @@
--- live.orig/liveMedia/RTSPServer.cpp 2010-
10-20 10:31:13.000000000 +02
00
+++ live/liveMedia/RTSPServer.cpp 2010-
10-20 12:34:04.772177998 +02
00
@@ -11
1,11 +111
,12 @@
char urlBuffer[100]; // more than big enough for "rtsp://<ip-address>:<port>/"
portNumBits portNumHostOrder = ntohs(fServerPort.num());
portNumBits portNumHostOrder = ntohs(f
RTSP
ServerPort.num());
+ char buf[16];
if (portNumHostOrder == 554 /* the default port number */) {
- sprintf(urlBuffer, "rtsp://%s/", our_inet_ntoa(ourAddress.sin_addr));
...
...
@@ -199,32 +173,30 @@ diff -ru live.orig/liveMedia/RTSPServer.cpp live/liveMedia/RTSPServer.cpp
}
return strDup(urlBuffer);
@@ -2
33,7 +234
,8 @@
@@ -2
64,7 +265
,8 @@
increaseSendBufferTo(envir(), clientSocket, 50*1024);
#if
defined(DEBUG) || defined(DEBUG_CONNECTIONS)
#if
def DEBUG
- envir() << "accept()ed connection from " << our_inet_ntoa(clientAddr.sin_addr) << '\n';
+ char buf[16];
+ envir() << "accept()ed connection from " << our_inet_ntoa(clientAddr.sin_addr, buf) << '\n';
#endif
// Create a new object for this RTSP session.
@@ -
747,10 +749,12
@@
serverRTPPort, serverRTCPPort,
fStreamStates[streamNum].streamToken);
@@ -
860,8 +862,10
@@
ReceivingInterfaceAddr = origReceivingInterfaceAddr;
struct in_addr destinationAddr; destinationAddr.s_addr = destinationAddress;
- char* destAddrStr = strDup(our_inet_ntoa(destinationAddr));
- char* sourceAddrStr = strDup(our_inet_ntoa(sourceAddr.sin_addr));
+ char destAddrStr[16];
+ our_inet_ntoa(destinationAddr, destAddrStr);
struct sockaddr_in sourceAddr; SOCKLEN_T namelen = sizeof sourceAddr;
getsockname(fClientSocket, (struct sockaddr*)&sourceAddr, &namelen);
- char* sourceAddrStr = strDup(our_inet_ntoa(sourceAddr.sin_addr));
+ char sourceAddrStr[16];
+ our_inet_ntoa(sourceAddr.sin_addr, sourceAddrStr);
if (fIsMulticast) {
switch (streamingMode) {
case RTP_UDP:
@@ -
825,7 +829
,7 @@
@@ -
936,7 +940
,7 @@
}
}
}
...
...
@@ -233,7 +205,7 @@ diff -ru live.orig/liveMedia/RTSPServer.cpp live/liveMedia/RTSPServer.cpp
}
void RTSPServer::RTSPClientSession
@@ -1
226,7 +123
0,8 @@
@@ -1
446,7 +145
0,8 @@
// If this gets called, the client session is assumed to have timed out,
// so delete it:
#ifdef DEBUG
...
...
@@ -244,8 +216,8 @@ diff -ru live.orig/liveMedia/RTSPServer.cpp live/liveMedia/RTSPServer.cpp
delete clientSession;
}
diff -ru live.orig/liveMedia/ServerMediaSession.cpp live/liveMedia/ServerMediaSession.cpp
--- live.orig/liveMedia/ServerMediaSession.cpp 2010-
05-30 01:20:31.000000000 +03
00
+++ live/liveMedia/ServerMediaSession.cpp 2010-
06-06 00:34:03.000000000 +03
00
--- live.orig/liveMedia/ServerMediaSession.cpp 2010-
10-20 10:31:13.000000000 +02
00
+++ live/liveMedia/ServerMediaSession.cpp 2010-
10-20 12:34:04.772177998 +02
00
@@ -185,7 +185,8 @@
char* ServerMediaSession::generateSDPDescription() {
struct in_addr ipAddress;
...
...
@@ -266,8 +238,8 @@ diff -ru live.orig/liveMedia/ServerMediaSession.cpp live/liveMedia/ServerMediaSe
}
diff -ru live.orig/liveMedia/SIPClient.cpp live/liveMedia/SIPClient.cpp
--- live.orig/liveMedia/SIPClient.cpp 2010-
05-30 01:20:31.000000000 +03
00
+++ live/liveMedia/SIPClient.cpp 2010-
06-06 00:34:03.000000000 +03
00
--- live.orig/liveMedia/SIPClient.cpp 2010-
10-20 10:31:13.000000000 +02
00
+++ live/liveMedia/SIPClient.cpp 2010-
10-20 12:34:04.772177998 +02
00
@@ -60,13 +60,14 @@
struct in_addr ourAddress;
...
...
@@ -295,8 +267,8 @@ diff -ru live.orig/liveMedia/SIPClient.cpp live/liveMedia/SIPClient.cpp
<< env.getResultMsg() << "\n";
}
diff -ru live.orig/testProgs/sapWatch.cpp live/testProgs/sapWatch.cpp
--- live.orig/testProgs/sapWatch.cpp 2010-
05-30 01:20:31.000000000 +03
00
+++ live/testProgs/sapWatch.cpp 2010-
06-06 00:34:03.000000000 +03
00
--- live.orig/testProgs/sapWatch.cpp 2010-
10-20 10:31:13.000000000 +02
00
+++ live/testProgs/sapWatch.cpp 2010-
10-20 12:34:04.772177998 +02
00
@@ -49,13 +49,14 @@
struct sockaddr_in fromAddress;
while (inputGroupsock.handleRead(packet, maxPacketSize,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment