mirror of
https://github.com/schoebel/mars
synced 2024-12-27 00:52:21 +00:00
main: discriminate input slot allocation reason
This commit is contained in:
parent
a6487909aa
commit
ff5f129c9e
@ -3834,6 +3834,7 @@ int _get_free_input(struct trans_logger_brick *trans_brick)
|
||||
{
|
||||
int nr = (((trans_brick->log_input_nr - TL_INPUT_LOG1) + 1) % 2) + TL_INPUT_LOG1;
|
||||
struct trans_logger_input *candidate;
|
||||
|
||||
candidate = trans_brick->inputs[nr];
|
||||
if (unlikely(!candidate)) {
|
||||
MARS_ERR("input nr = %d is corrupted!\n", nr);
|
||||
@ -3841,7 +3842,7 @@ int _get_free_input(struct trans_logger_brick *trans_brick)
|
||||
}
|
||||
if (unlikely(candidate->is_operating || candidate->connect)) {
|
||||
MARS_DBG("nr = %d unusable! is_operating = %d connect = %p\n", nr, candidate->is_operating, candidate->connect);
|
||||
return -EEXIST;
|
||||
return -EAGAIN;
|
||||
}
|
||||
MARS_DBG("got nr = %d\n", nr);
|
||||
return nr;
|
||||
|
Loading…
Reference in New Issue
Block a user