aboutsummaryrefslogtreecommitdiffstats
path: root/audio/raproxy/files/patch-aa
blob: bd644fe15627818053c8190fe457798043ec05d9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
--- raproxy.c.dist  Thu Dec 19 15:53:23 1996
+++ raproxy.c   Mon Jul 27 11:09:01 1998
@@ -668,6 +668,7 @@
 {
    int     size;
    struct sockaddr_in  addr, info;
+   int port;
 
    /* setup bind/listen etc for udp backchannel from server */
    if ( (serveraudiofd = socket (AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0 ) {
@@ -675,6 +676,15 @@
        syslog(LOG_LVL, "raproxy: can't setup socket: %m");
        return(-1);     /* Probably out of sockets */
    }
+#ifdef IP_PORTRANGE
+   port = IP_PORTRANGE_HIGH;
+   if ( setsockopt(serveraudiofd, IPPROTO_IP, IP_PORTRANGE, (char *) &port,
+       sizeof(port)) < 0 ) {
+       syslog(LOG_LVL, "raproxy: can't setsockopt(): %m");
+       /* syslog error ? */
+       return(-1);
+   }
+#endif
    (void) bzero (&addr, sizeof (addr));
    addr.sin_family = AF_INET;
    /* 
@@ -1145,6 +1155,7 @@
 {
    struct sockaddr_in  addr, info;
    int     size;
+   int     port;
 
    /*
     * allocate/setup socket/fd/port FROM which we'll
@@ -1155,6 +1166,15 @@
        syslog(LOG_LVL, "raproxy: can't setup socket: %m");
        return(-1);     /* Probably out of sockets */
    }
+#ifdef IP_PORTRANGE
+   port = IP_PORTRANGE_HIGH;
+   if ( setsockopt(serveraudiofd, IPPROTO_IP, IP_PORTRANGE, (char *) &port,
+       sizeof(port)) < 0 ) {
+       syslog(LOG_LVL, "raproxy: can't setsockopt(): %m");
+       /* syslog error ? */
+       return(-1);
+   }
+#endif
    (void) bzero (&addr, sizeof (addr));
    addr.sin_family = AF_INET;
    addr.sin_port = htons(0);