[mythtv-commits] Ticket #686: mythfilldatabase segfaults when backend is not running and wakeup not set

MythTV mythtv at cvs.mythtv.org
Mon Nov 21 12:48:44 EST 2005


#686: mythfilldatabase segfaults when backend is not running and wakeup not set
----------------------------------------+-----------------------------------
 Reporter:  mythdev at penyball.cix.co.uk  |       Owner:  ijr 
     Type:  patch                       |      Status:  new 
 Priority:  minor                       |   Milestone:  0.19
Component:  mythtv                      |     Version:  head
 Severity:  low                         |  
----------------------------------------+-----------------------------------
Common 'installation' sequence is to run mythtv-install, then
 mythfilldatabase, then start backend/frontend - so this segfault will be
 seen by 'new' users and may cause some concern.
 Following fixes the segfault + a minor cosmetic fix to connection
 reporting - currently the loop reports  "....  (try 6 of 5)"  because the
 maxcount doesn't include the first pass through the loop before the
 retries.

 {{{
 Index: mythtv/libs/libmyth/mythcontext.cpp
 ===================================================================
 --- mythtv/libs/libmyth/mythcontext.cpp (revision 7959)
 +++ mythtv/libs/libmyth/mythcontext.cpp (working copy)
 @@ -908,7 +908,7 @@
          VERBOSE(VB_GENERAL, QString("Connecting to backend server: "
                                      "%1:%2 (try %3 of %4)")
                                      .arg(hostname).arg(port).arg(cnt+1)
 -                                    .arg(maxConnTry));
 +                                    .arg(maxConnTry+1));

          serverSock = new QSocketDevice(QSocketDevice::Stream);

 @@ -961,7 +961,7 @@
      while (cnt <= maxConnTry);

  #ifndef IGNORE_PROTO_VER_MISMATCH
 -    if (!CheckProtoVersion(serverSock))
 +    if (serverSock && !CheckProtoVersion(serverSock))
      {
          delete serverSock;
          serverSock = NULL;
 }}}

-- 
Ticket URL: <http://cvs.mythtv.org/trac/ticket/686>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list