if (!mir_connection_is_valid(connection)) { mir_connection_release(connection); confuse_reader(); }
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mir |
Triaged
|
Medium
|
Unassigned | ||
mir (Ubuntu) |
Triaged
|
Medium
|
Unassigned |
Bug Description
if (!mir_connectio
{
mir_
confuse_
}
Apparently we've designed the client API such that even invalid connections need to be released. This is confusing because an "invalid" object is not something that normally needs releasing.
I'm told this is because the connection still represents an error object which needs releasing. This is a somewhat valid excuse, but we still have an ambiguity that needs solving:
If a connection is "invalid" due to being an uninitialized pointer then we need to stop the user from calling mir_connection_
Even if we solve this in libmirclient with some internal mir_connection_
Suggestion: If we do keep the current behaviour, then we could solve the confusion just by renaming:
mir_
to
mir_
Syncing task from Mir.