#endif
#include <pulse/context.h>
+#include <pulse/direction.h>
#include <pulse/xmalloc.h>
#include <pulse/fork-detect.h>
pa_tagstruct_getu32(t, &port->priority) < 0 ||
pa_tagstruct_getu32(t, &available) < 0 ||
pa_tagstruct_getu8(t, &direction) < 0 ||
+ !pa_direction_valid(direction) ||
pa_tagstruct_get_proplist(t, port->proplist) < 0 ||
pa_tagstruct_getu32(t, &port->n_profiles) < 0) {
return -PA_ERR_PROTOCOL;
}
- if (available > PA_PORT_AVAILABLE_YES ||
- direction > PA_DIRECTION_OUTPUT + PA_DIRECTION_INPUT) {
-
+ if (available > PA_PORT_AVAILABLE_YES ) {
return -PA_ERR_PROTOCOL;
}