[pulseaudio-discuss] [PATCH 2/3] module-port-manager: Add new port manager module

Alexander E. Patrakov patrakov at gmail.com
Tue Mar 10 11:28:23 PDT 2015


10.03.2015 19:05, David Henningsson wrote:
> +PA_MODULE_USAGE("");

No other module does this.

> +
> +#define SAVE_INTERVAL (5 * PA_USEC_PER_SEC)

Some modules use 5 seconds, some 10 seconds. Why the inconsistency?

> +static void rplist_save(userdata *u, rplist *rl) {
> +    pa_strbuf *buf;
> +    pa_datum key, value;
> +    rport *r;
> +    unsigned idx;
> +
> +    pa_assert(u);
> +    pa_assert(u->database);

u->database is guaranteed to be non-NULL by an explicit "otherwise goto 
fail" logic in pa__init() and lack of other assignments. But well - I 
have nothing against obviously-true assertions :)

> +    PA_DYNARRAY_FOREACH(r, rl->l, idx) {
> +        if (r->port) {
> +            //void *s = NULL;
> +
> +            if (r->port->available == PA_AVAILABLE_NO)
> +                continue;
> +
> +            /* Disregard ports not completely set up */
> +/*            s = rl->direction == PA_DIRECTION_INPUT ? (void *) find_source_for_port(r->port) : (void *) find_sink_for_port(r->port);
> +            if (s == NULL)
> +                continue; */

Why is the code commented out?

I have read the rest of the patch, and could not find anything obviously 
wrong. But I have not tested it, either, so it is not an "ack" yet. I 
intend to do some testing in the next hour and also tomorrow.

-- 
Alexander E. Patrakov


More information about the pulseaudio-discuss mailing list