Ticket #5672: libs_libmythdb-uninit.patch

File libs_libmythdb-uninit.patch, 1.3 KB (added by Erik Hovland <erik@…>, 11 years ago)

zeros out m_readyread_pipe in ctor

  • mythtv/libs/libmythdb/mythsocket.cpp

    Fix initialization issues in mythdb
    
    From: Erik Hovland <erik@hovland.org>
    
    
    ---
    
     mythtv/libs/libmythdb/mythsocket.cpp |    8 ++++++++
     mythtv/libs/libmythdb/mythsocket.h   |    2 +-
     2 files changed, 9 insertions(+), 1 deletions(-)
    
    diff --git a/mythtv/libs/libmythdb/mythsocket.cpp b/mythtv/libs/libmythdb/mythsocket.cpp
    index 5d773bf..689320b 100644
    a b const uint MythSocket::kSocketBufferSize = 128000; 
    2929
    3030MythSocketThread MythSocket::m_readyread_thread;
    3131
     32MythSocketThread::MythSocketThread()
     33    : QThread(), m_readyread_run(false)
     34{
     35#if !defined(USING_MINGW)
     36    bzero(m_readyread_pipe, sizeof(m_readyread_pipe));
     37#endif
     38}
     39
    3240MythSocket::MythSocket(int socket, MythSocketCBs *cb)
    3341    : MSocketDevice(MSocketDevice::Stream),            m_cb(cb),
    3442      m_state(Idle),         m_addr(),                 m_port(0),
  • mythtv/libs/libmythdb/mythsocket.h

    diff --git a/mythtv/libs/libmythdb/mythsocket.h b/mythtv/libs/libmythdb/mythsocket.h
    index f2c2288..dcce51c 100644
    a b class MPUBLIC MythSocketCBs 
    2828class MPUBLIC MythSocketThread : public QThread
    2929{
    3030  public:
    31     MythSocketThread() : QThread(), m_readyread_run(false) {}
     31    MythSocketThread();
    3232
    3333    virtual void run();
    3434