Changeset 2815e99445ba576d06e3688df81db6ae59732b13

Show
Ignore:
Timestamp:
03/02/08 20:01:43 (6 months ago)
Author:
Rémi Denis-Courmont <rem@videolan.org>
git-committer:
Rémi Denis-Courmont <rem@videolan.org> 1204484503 +0200
git-parent:

[f8c4e779ab99f83ab0494a2ce3a2a9960dafcbf4]

git-author:
Rémi Denis-Courmont <rem@videolan.org> 1204484503 +0200
Message:

Set the DCCP service code properly.

Assume RTP converys video (which is fine for MPEG-TS), as we cannot
know if it's only audio anyway.

Signed-off-by: Rémi Denis-Courmont <rem@videolan.org>

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/access/udp.c

    r99fab90 r2815e99  
    233233        case IPPROTO_DCCP: 
    234234#ifdef SOCK_DCCP 
     235            var_Create( p_access, "dccp-service", VLC_VAR_STRING ); 
     236            var_SetString( p_access, "dccp-service", "RTPV" ); 
    235237            p_sys->fd = net_Connect( p_access, psz_server_addr, i_server_port, 
    236238                                     SOCK_DCCP, IPPROTO_DCCP ); 
  • src/network/io.c

    re589680 r2815e99  
    6969#endif 
    7070 
     71#ifdef HAVE_LINUX_DCCP_H 
     72/* TODO: use glibc instead of linux-kernel headers */ 
     73# include <linux/dccp.h> 
     74# define SOL_DCCP 269 
     75#endif 
     76 
    7177extern int rootwrap_bind (int family, int socktype, int protocol, 
    7278                          const struct sockaddr *addr, size_t alen); 
     
    117123        setsockopt (fd, IPPROTO_IPV6, IPV6_PROTECTION_LEVEL, 
    118124                    &(int){ PROTECTION_LEVEL_UNRESTRICTED }, sizeof (int)); 
     125#endif 
     126 
     127#ifdef DCCP_SOCKOPT_SERVICE 
     128    char *dccps = var_CreateGetNonEmptyString (p_this, "dccp-service"); 
     129    if (dccps != NULL) 
     130    { 
     131        setsockopt (fd, SOL_DCCP, DCCP_SOCKOPT_SERVICE, dccps, 
     132                    (strlen (dccps) + 3) & ~3); 
     133        free (dccps); 
     134    } 
    119135#endif 
    120136