xrdp_mm_get_wait_objs(struct xrdp_mm* self,
                      tbus* read_objs, int* rcount,
                      tbus* write_objs, int* wcount, int* timeout)
{
  int rv = 0;

  if (self == 0)
  {
    return 0;
  }
  rv = 0;
  if ((self->sesman_trans != 0) && self->sesman_trans_up)
  {
    trans_get_wait_objs(self->sesman_trans, read_objs, rcount, timeout);
  }
  if ((self->chan_trans != 0) && self->chan_trans_up)
  {
    trans_get_wait_objs(self->chan_trans, read_objs, rcount, timeout);
  }
  if (self->mod != 0)
  {
    if (self->mod->mod_get_wait_objs != 0)
    {
      rv = self->mod->mod_get_wait_objs(self->mod, read_objs, rcount,
                                        write_objs, wcount, timeout);
    }
  }

  return rv;
}
xrdp_mm_get_wait_objs(struct xrdp_mm* self,
                      tbus* read_objs, int* rcount,
                      tbus* write_objs, int* wcount, int* timeout)
{
  int rv = 0;

  if (self == 0)
  {
    return 0;
  }
  rv = 0;
  if ((self->sesman_trans != 0) && self->sesman_trans_up)
  {
    trans_get_wait_objs(self->sesman_trans, read_objs, rcount, timeout);
  }
  if ((self->chan_trans != 0) && self->chan_trans_up)
  {
    trans_get_wait_objs(self->chan_trans, read_objs, rcount, timeout);
  }
  if (self->mod != 0)
  {
    if (self->mod->mod_get_wait_objs != 0)
    {
      rv = self->mod->mod_get_wait_objs(self->mod, read_objs, rcount,
                                        write_objs, wcount, timeout);
    }
  }

  return rv;
}