* Activator connections will not receive any
* broadcast messages.
*/
- if (conn_dst->flags & KDBUS_HELLO_ACTIVATOR)
+ if (conn_dst->type != KDBUS_CONN_CONNECTED &&
+ conn_dst->type != KDBUS_CONN_MONITOR)
continue;
if (!kdbus_match_db_match_kmsg(conn_dst->match_db,
conn_dst = kdbus_conn_ref(entry->conn);
if ((msg->flags & KDBUS_MSG_FLAGS_NO_AUTO_START) &&
- (conn_dst->flags & KDBUS_HELLO_ACTIVATOR)) {
+ (conn_dst->type == KDBUS_CONN_ACTIVATOR)) {
ret = -EADDRNOTAVAIL;
goto exit_unref;
}
list_splice_init(&conn->names_queue_list, &names_queue_list);
mutex_unlock(&conn->lock);
- if (conn->flags & KDBUS_HELLO_ACTIVATOR) {
+ if (conn->type == KDBUS_CONN_ACTIVATOR) {
activator = conn->activator_of->activator;
conn->activator_of->activator = NULL;
}
goto exit_unlock;
}
- if (conn->flags & KDBUS_HELLO_ACTIVATOR) {
+ if (conn->type == KDBUS_CONN_ACTIVATOR) {
/* An activator can only own a single name */
if (conn->activator_of) {
if (conn->activator_of == e)
goto exit_unlock;
} else {
/* An activator can only own a single name */
- if ((conn->flags & KDBUS_HELLO_ACTIVATOR) &&
+ if ((conn->type == KDBUS_CONN_ACTIVATOR) &&
conn->activator_of) {
ret = -EINVAL;
goto exit_unlock;
goto exit_unlock;
}
- if (conn->flags & KDBUS_HELLO_ACTIVATOR) {
+ if (conn->type & KDBUS_CONN_ACTIVATOR) {
e->activator = kdbus_conn_ref(conn);
conn->activator_of = e;
}
/* skip activators */
if (!(flags & KDBUS_NAME_LIST_ACTIVATORS) &&
- c->flags & KDBUS_HELLO_ACTIVATOR)
+ c->type == KDBUS_CONN_ACTIVATOR)
continue;
/* all names the connection owns */
}
if (flags & KDBUS_NAME_LIST_NAMES ||
- c->flags & KDBUS_HELLO_ACTIVATOR) {
+ c->type == KDBUS_CONN_ACTIVATOR) {
ret = kdbus_name_list_write(conn, c,
slice, &p, e, write);
if (ret < 0)