Bug #2369 ยป hts-fix-bug-2096.patch
src/udp.c | ||
---|---|---|
48 | 48 |
snprintf(port_buf, 6, "%d", uc->port); |
49 | 49 | |
50 | 50 |
memset(&hints, 0, sizeof(struct addrinfo)); |
51 |
hints.ai_flags = receiver ? AI_PASSIVE : 0;
|
|
51 |
hints.ai_flags = (receiver ? AI_PASSIVE : 0) | AI_NUMERICSERV;
|
|
52 | 52 |
hints.ai_family = AF_UNSPEC; |
53 | 53 |
hints.ai_socktype = SOCK_DGRAM; |
54 | 54 |
|
... | ... | |
150 | 150 | |
151 | 151 |
udp_connection_t * |
152 | 152 |
udp_bind ( const char *subsystem, const char *name, |
153 |
const char *bindaddr, int port,
|
|
153 |
const char *bindaddr, uint16_t port,
|
|
154 | 154 |
const char *ifname, int rxsize ) |
155 | 155 |
{ |
156 | 156 |
int fd, ifindex, reuse = 1; |
... | ... | |
278 | 278 |
int |
279 | 279 |
udp_bind_double ( udp_connection_t **_u1, udp_connection_t **_u2, |
280 | 280 |
const char *subsystem, const char *name1, |
281 |
const char *name2, const char *host, int port,
|
|
281 |
const char *name2, const char *host, uint16_t port,
|
|
282 | 282 |
const char *ifname, int rxsize1, int rxsize2 ) |
283 | 283 |
{ |
284 | 284 |
udp_connection_t *u1 = NULL, *u2 = NULL; |
285 | 285 |
udp_connection_t *ucs[10] = { NULL, NULL, NULL, NULL, NULL, |
286 | 286 |
NULL, NULL, NULL, NULL, NULL }; |
287 |
int pos = 0, i, port2; |
|
287 |
int pos = 0, i; |
|
288 |
uint16_t port2; |
|
288 | 289 | |
289 | 290 |
memset(&ucs, 0, sizeof(ucs)); |
290 | 291 |
while (1) { |
... | ... | |
315 | 316 | |
316 | 317 |
udp_connection_t * |
317 | 318 |
udp_connect ( const char *subsystem, const char *name, |
318 |
const char *host, int port,
|
|
319 |
const char *host, uint16_t port,
|
|
319 | 320 |
const char *ifname, int txsize ) |
320 | 321 |
{ |
321 | 322 |
int fd, ifindex; |
src/udp.h | ||
---|---|---|
27 | 27 | |
28 | 28 |
typedef struct udp_connection { |
29 | 29 |
char *host; |
30 |
int port;
|
|
30 |
uint16_t port;
|
|
31 | 31 |
int multicast; |
32 | 32 |
char *ifname; |
33 | 33 |
struct sockaddr_storage ip; |
... | ... | |
39 | 39 | |
40 | 40 |
udp_connection_t * |
41 | 41 |
udp_bind ( const char *subsystem, const char *name, |
42 |
const char *bindaddr, int port,
|
|
42 |
const char *bindaddr, uint16_t port,
|
|
43 | 43 |
const char *ifname, int rxsize ); |
44 | 44 |
int |
45 | 45 |
udp_bind_double ( udp_connection_t **_u1, udp_connection_t **_u2, |
46 | 46 |
const char *subsystem, const char *name1, |
47 |
const char *name2, const char *host, int port,
|
|
47 |
const char *name2, const char *host, uint16_t port,
|
|
48 | 48 |
const char *ifname, int rxsize1, int rxsize2 ); |
49 | 49 |
udp_connection_t * |
50 | 50 |
udp_connect ( const char *subsystem, const char *name, |
51 |
const char *host, int port,
|
|
51 |
const char *host, uint16_t port,
|
|
52 | 52 |
const char *ifname, int txsize ); |
53 | 53 |
void |
54 | 54 |
udp_close ( udp_connection_t *uc ); |
src/url.h | ||
---|---|---|
29 | 29 |
char *user; |
30 | 30 |
char *pass; |
31 | 31 |
char *host; |
32 |
short port;
|
|
32 |
uint16_t port;
|
|
33 | 33 |
char *path; |
34 | 34 |
char *query; |
35 | 35 |
char *frag; |