Browse Source

add some log, fix indent

pull/15/head
Koichiro IWAO 6 years ago
parent
commit
80ee64dbc9
2 changed files with 16 additions and 6 deletions
  1. +8
    -3
      src/module-xrdp-sink.c
  2. +8
    -3
      src/module-xrdp-source.c

+ 8
- 3
src/module-xrdp-sink.c View File

@ -319,9 +319,14 @@ static int data_send(struct userdata *u, pa_memchunk *chunk) {
sink_socket = getenv("CHANSRV_PULSE_SINK_SOCKET"); sink_socket = getenv("CHANSRV_PULSE_SINK_SOCKET");
if (sink_socket == NULL || sink_socket[0] == '\0') if (sink_socket == NULL || sink_socket[0] == '\0')
{ {
/* usually it doesn't reach here. if the socket name is not given
via environment variable, use hardcoded name as fallback */
snprintf(sink_socket, bytes, "xrdp_chansrv_audio_out_socket_%d", u->display_num);
pa_log("Could not obtain sink_socket from environment.");
/* usually it doesn't reach here. if the socket name is not given
via environment variable, use hardcoded name as fallback */
snprintf(sink_socket, bytes, "xrdp_chansrv_audio_out_socket_%d", u->display_num);
}
else
{
pa_log("Obtained sink_socket from environment.");
} }
snprintf(s.sun_path, bytes, "%s/%s", socket_dir, sink_socket); snprintf(s.sun_path, bytes, "%s/%s", socket_dir, sink_socket);
pa_log_debug("trying to connect to %s", s.sun_path); pa_log_debug("trying to connect to %s", s.sun_path);


+ 8
- 3
src/module-xrdp-source.c View File

@ -197,9 +197,14 @@ static int data_get(struct userdata *u, pa_memchunk *chunk) {
if (source_socket == NULL || source_socket[0] == '\0') if (source_socket == NULL || source_socket[0] == '\0')
{ {
/* usually it doesn't reach here. if the socket name is not given
via environment variable, use hardcoded name as fallback */
snprintf(source_socket, bytes, "xrdp_chansrv_audio_in_socket_%d", u->display_num);
pa_log("Could not obtain source_socket from environment.");
/* usually it doesn't reach here. if the socket name is not given
via environment variable, use hardcoded name as fallback */
snprintf(source_socket, bytes, "xrdp_chansrv_audio_in_socket_%d", u->display_num);
}
else
{
pa_log("Obtained sink_socket from environment.");
} }
snprintf(s.sun_path, bytes, "%s/%s", socket_dir, source_socket); snprintf(s.sun_path, bytes, "%s/%s", socket_dir, source_socket);
pa_log_debug("Trying to connect to %s", s.sun_path); pa_log_debug("Trying to connect to %s", s.sun_path);


Loading…
Cancel
Save