Skip to content
Snippets Groups Projects
  1. Mar 10, 2016
  2. Feb 09, 2016
  3. Feb 04, 2016
    • Peter Maydell's avatar
      io: Clean up includes · cae9fc56
      Peter Maydell authored
      
      Clean up includes so that osdep.h is included first and headers
      which it implies are not included manually.
      
      This commit was created with scripts/clean-includes.
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1454089805-5470-14-git-send-email-peter.maydell@linaro.org
      cae9fc56
  4. Jan 20, 2016
  5. Jan 19, 2016
  6. Dec 23, 2015
    • Daniel P. Berrangé's avatar
      io: fix stack allocation when sending of file descriptors · 7b3c618a
      Daniel P. Berrangé authored
      
      When sending file descriptors over a socket, we have to
      allocate a data buffer to hold the FDs in the scmsghdr.
      Unfortunately we allocated the buffer on the stack inside
      an if () {} block, but called sendmsg() outside the block.
      So the stack bytes holding the FDs were liable to be
      overwritten with other data. By luck this was not a problem
      when sending 1 FD, but if sending 2 or more then it would
      fail.
      
      The fix is to simply move the variables outside the nested
      'if' block. To keep valgrind quiet we also zero-initialize
      the 'control' buffer.
      
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Signed-off-by: default avatarDaniel P. Berrange <berrange@redhat.com>
      7b3c618a
  7. Dec 22, 2015
  8. Dec 18, 2015
    • Daniel P. Berrangé's avatar
      io: add QIOChannelSocket class · 559607ea
      Daniel P. Berrangé authored
      
      Implement a QIOChannel subclass that supports sockets I/O.
      The implementation is able to manage a single socket file
      descriptor, whether a TCP/UNIX listener, TCP/UNIX connection,
      or a UDP datagram. It provides APIs which can listen and
      connect either asynchronously or synchronously. Since there
      is no asynchronous DNS lookup API available, it uses the
      QIOTask helper for spawning a background thread to ensure
      non-blocking operation.
      
      Signed-off-by: default avatarDaniel P. Berrange <berrange@redhat.com>
      559607ea
Loading