connection: return -EOPNOTSUPP if the connection has already died
authorDaniel Mack <daniel@zonque.org>
Thu, 11 Sep 2014 14:38:35 +0000 (16:38 +0200)
committerDaniel Mack <daniel@zonque.org>
Thu, 11 Sep 2014 14:38:35 +0000 (16:38 +0200)
connection.c

index 1ba4df563db8319ea409785f4816ab0df92dc4d3..2778e0b995698119da066e00243dd2e185412027 100644 (file)
@@ -797,7 +797,7 @@ int kdbus_conn_disconnect(struct kdbus_conn *conn, bool ensure_queue_empty)
        mutex_lock(&conn->lock);
        if (!kdbus_conn_active(conn)) {
                mutex_unlock(&conn->lock);
-               return -EALREADY;
+               return -EOPNOTSUPP;
        }
 
        if (ensure_queue_empty && !list_empty(&conn->queue.msg_list)) {