}
if (u->version >= 16) {
- uint32_t n_ports, j;
+ uint32_t n_ports;
const char *s;
if (pa_tagstruct_getu32(t, &n_ports)) {
goto fail;
}
- for (j = 0; j < n_ports; j++) {
+ for (uint32_t j = 0; j < n_ports; j++) {
uint32_t priority;
if (pa_tagstruct_gets(t, &s) < 0 || /* name */
}
}
+ if (u->version >= 16) {
+ uint32_t n_ports;
+ const char *s;
+
+ if (pa_tagstruct_getu32(t, &n_ports)) {
+ pa_log("Parse failure");
+ goto fail;
+ }
+
+ for (uint32_t j = 0; j < n_ports; j++) {
+ uint32_t priority;
+
+ if (pa_tagstruct_gets(t, &s) < 0 || /* name */
+ pa_tagstruct_gets(t, &s) < 0 || /* description */
+ pa_tagstruct_getu32(t, &priority) < 0) {
+
+ pa_log("Parse failure");
+ goto fail;
+ }
+ }
+
+ if (pa_tagstruct_gets(t, &s) < 0) { /* active port */
+ pa_log("Parse failure");
+ goto fail;
+ }
+ }
+
if (!pa_tagstruct_eof(t)) {
pa_log("Packet too long");
goto fail;