Ticket #44: pulseaudio-esound-port.patch

File pulseaudio-esound-port.patch, 1.1 kB (added by Apatsch, 1 year ago)
  • pulseaudio-0.9.5/src/modules/module-esound-sink.c

    old new  
    8383 
    8484static const char* const valid_modargs[] = { 
    8585    "server", 
     86    "port", 
    8687    "cookie", 
    8788    "rate", 
    8889    "format", 
     
    321322    pa_sample_spec ss; 
    322323    pa_modargs *ma = NULL; 
    323324    char *t; 
     325    uint32_t port=0; 
    324326     
    325327    assert(c && m); 
    326328     
     
    362364        goto fail; 
    363365    } 
    364366 
    365     if (!(u->client = pa_socket_client_new_string(u->core->mainloop, p = pa_modargs_get_value(ma, "server", ESD_UNIX_SOCKET_NAME), ESD_DEFAULT_PORT))) { 
     367    if (pa_modargs_get_value_u32(ma, "port", &port) < 0) { 
     368        port=ESD_DEFAULT_PORT; 
     369    } 
     370 
     371    if (!(u->client = pa_socket_client_new_string(u->core->mainloop, p = pa_modargs_get_value(ma, "server", ESD_UNIX_SOCKET_NAME), port))) { 
    366372        pa_log("failed to connect to server."); 
    367373        goto fail; 
    368374    } 
     375     
    369376    pa_socket_client_set_callback(u->client, on_connection, u); 
    370377 
    371378    /* Prepare the initial request */