diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2007-08-15 11:42:23 +0000 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2007-08-15 11:42:23 +0000 |
commit | 47c2c74c8a11fcb3d53e4e124c317d243b5a12c0 (patch) | |
tree | ab74d776e48f779fbf6d3b7c9b1a00a5037fbbd9 /audio | |
parent | c5c555e1b78f4301abe1e9ee46d65eb8f215ee53 (diff) |
The resume variable is redundant
Diffstat (limited to 'audio')
-rw-r--r-- | audio/sink.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/audio/sink.c b/audio/sink.c index bdbabab2..50d45718 100644 --- a/audio/sink.c +++ b/audio/sink.c @@ -60,7 +60,6 @@ struct sink { DBusConnection *conn; gboolean initiator; gboolean suspending; - gboolean resume; }; static void pending_connect_free(struct pending_request *c) @@ -121,14 +120,13 @@ void stream_state_changed(struct avdtp_stream *stream, avdtp_state_t old_state, if (!sink->initiator) break; - if (sink->resume || (sink->c && sink->c->pkt)) { + if (sink->c && sink->c->pkt) { cmd_err = avdtp_start(sink->session, stream); if (cmd_err < 0) { error("Error on avdtp_start %s (%d)", strerror(-cmd_err), cmd_err); goto failed; } - sink->resume = FALSE; } else c = sink->c; @@ -395,10 +393,9 @@ int sink_get_config(struct device *dev, int sock, struct ipc_packet *req, err = avdtp_discover(sink->session, discovery_complete, dev); else if (sink->state < AVDTP_STATE_STREAMING) err = avdtp_start(sink->session, sink->stream); - else if (sink->suspending) { - sink->resume = TRUE; + else if (sink->suspending) err = 0; - } else + else err = -EINVAL; if (err < 0) |