Refactor ust-app create session
This function was basically a mess for returned values. A valid pointer
that could be a created or already existing session, NULL on error or -1
on disconnect error...
Now, it returns 0 on success or a negative errno code. It populates the
ust app session pointer parameter given by the caller and sets to 1, if
available, the is_created parameter if we did in fact create a new
session.
The motivation behind that was to be able to know if the session was
created or not so we could do a cleanup aftwerwards if any error on the
code path requires wipping the session object. This patch uses that for
the case of a create channel failure just after the session creation. It
now wipes the session if it was created.
Furthermore, this has been error prone in the past by forgetting to
handle the -1 error value being in a pointer variable.
Signed-off-by: David Goulet <dgoulet@efficios.com>
This page took 0.025293 seconds and 4 git commands to generate.