Lines Matching defs:rsp
148 static int service_recv(struct userdata *u, bt_audio_msg_header_t *rsp)
156 length = rsp->length ? : BT_SUGGESTED_BUFFER_SIZE;
159 if (recv(u->service_fd, rsp, length, 0) > 0) {
160 type = bt_audio_strtype(rsp->type);
161 name = bt_audio_strname(rsp->name);
169 rsp->type, rsp->name);
180 static ssize_t service_expect(struct userdata *u, bt_audio_msg_header_t *rsp,
187 assert(rsp);
189 if ((r = service_recv(u, rsp)) < 0)
192 if ((rsp->type != BT_INDICATION && rsp->type != BT_RESPONSE) ||
193 (rsp->name != expected_name)) {
194 if (rsp->type == BT_ERROR && rsp->length == sizeof(bt_audio_error_t))
196 strerror(((bt_audio_error_t*) rsp)->posix_errno));
199 bt_audio_strname(rsp->name),
225 static int parse_caps(struct userdata *u, const struct bt_get_capabilities_rsp *rsp)
232 assert(rsp);
234 bytes_left = rsp->h.length - sizeof(*rsp);
241 ptr = ((void *) rsp) + sizeof(*rsp);
829 bt_audio_msg_header_t rsp;
858 msg.rsp.length = sizeof(msg.start_rsp);
859 if (service_expect(u, &msg.rsp, BT_START_STREAM) < 0)
862 msg.rsp.length = sizeof(msg.streamfd_ind);
863 if (service_expect(u, &msg.rsp, BT_NEW_STREAM) < 0)
886 bt_audio_msg_header_t rsp;
915 msg.rsp.length = sizeof(msg.stop_rsp);
916 if (service_expect(u, &msg.rsp, BT_STOP_STREAM) < 0)