mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
fix parsing of POLYP_SERVER environment variable
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@196 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
b1ab6869fb
commit
1231598206
4 changed files with 12 additions and 6 deletions
3
doc/todo
3
doc/todo
|
|
@ -15,11 +15,8 @@
|
|||
- option to use default fragment size on alsa drivers
|
||||
- lazy sample cache
|
||||
- per-channel volume
|
||||
- fix or work around libtool bug
|
||||
- merge pa_context_connect_*
|
||||
- input latency
|
||||
- fix public=
|
||||
- fix POLYP_SERVER=foo:4711
|
||||
- fix tcp/native
|
||||
- suid
|
||||
|
||||
|
|
|
|||
|
|
@ -63,6 +63,11 @@ polypinclude_HEADERS= \
|
|||
sample.h \
|
||||
glib-mainloop.h
|
||||
|
||||
### Warning! Due to an obscure bug in libtool/automake it is required
|
||||
### that the libraries in modlib_LTLIBRARIES are specified in-order,
|
||||
### i.e. libraries near the end of the list depend on libraries near
|
||||
### the head, and not the other way!
|
||||
|
||||
modlib_LTLIBRARIES= \
|
||||
libsocket-util.la \
|
||||
libiochannel.la \
|
||||
|
|
|
|||
|
|
@ -336,11 +336,15 @@ finish:
|
|||
static struct sockaddr *resolve_server(const char *server, size_t *len) {
|
||||
struct sockaddr *sa;
|
||||
struct addrinfo hints, *result = NULL;
|
||||
char *port;
|
||||
char *port, host[256];
|
||||
assert(server && len);
|
||||
|
||||
snprintf(host, sizeof(host), "%s", server);
|
||||
host[strcspn(host, ":")] = 0;
|
||||
|
||||
if ((port = strrchr(server, ':')))
|
||||
port++;
|
||||
|
||||
if (!port)
|
||||
port = DEFAULT_PORT;
|
||||
|
||||
|
|
@ -349,7 +353,7 @@ static struct sockaddr *resolve_server(const char *server, size_t *len) {
|
|||
hints.ai_socktype = SOCK_STREAM;
|
||||
hints.ai_protocol = 0;
|
||||
|
||||
if (getaddrinfo(server, port, &hints, &result) != 0)
|
||||
if (getaddrinfo(host, port, &hints, &result) != 0)
|
||||
return NULL;
|
||||
assert(result);
|
||||
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ static void do_call(struct pa_socket_client *c) {
|
|||
}
|
||||
|
||||
if (error != 0) {
|
||||
pa_log(__FILE__": connect(): %s\n", strerror(error));
|
||||
/* pa_log(__FILE__": connect(): %s\n", strerror(error)); */
|
||||
goto finish;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue