Ticket #4272: bugs.patch

File bugs.patch, 3.8 KB (added by andrei@…, 12 years ago)
  • libs/libmythtv/RingBuffer.cpp

     
    207211        while (openTimer.elapsed() < timetowait)
    208212        {
    209213            lasterror = 0;
    210             fd2 = open(filename.local8Bit(), O_RDONLY|O_LARGEFILE|O_STREAMING);
     214            fd2 = open(filename.local8Bit(), O_RDONLY|O_LARGEFILE|O_STREAMING|O_BINARY);
    211215               
    212216            if (fd2 < 0)
    213217            {
  • libs/libmythtv/tv_play.cpp

     
    25992603    if (handled)
    26002604        return;
    26012605
    2602     if (activerbuffer->isDVD() && activerbuffer->DVD()->IsInMenu())
     2606    if (activerbuffer && activerbuffer->isDVD() && activerbuffer->DVD()->IsInMenu())
    26032607    {
    26042608        for (unsigned int i = 0; i < actions.size(); i++)
    26052609        {
  • libs/libmythtv/tv_rec.cpp

     
    4646#include "dtvchannel.h"
    4747#include "dvbchannel.h"
    4848#include "dbox2channel.h"
     49#ifdef USING_HDHOMERUN
    4950#include "hdhrchannel.h"
     51#endif
    5052#include "iptvchannel.h"
    5153#include "firewirechannel.h"
    5254
  • libs/libmyth/mythplugin.cpp

     
    3135
    3236    if (ifunc)
    3337        return ifunc(libversion);
    34 
    3538    if (!dlerror())
    3639        (void)dlopen(QLibrary::library().ascii(), RTLD_LAZY);
    37     VERBOSE(VB_IMPORTANT, QString("MythPlugin::init() dlerror: ") + dlerror());
     40    VERBOSE(VB_IMPORTANT, QString("MythPlugin::init() dlerror: ").arg(dlerror()));
    3841    return -1;
    3942}
    4043
  • libs/libmyth/mythcontext.cpp

     
    14851503        d->serverSock = ConnectServer(d->eventSock, server,
    14861504                                      port, blockingClient);
    14871505
    1488     if (d->eventSock)
     1506    if (d->serverSock)
    14891507        d->eventSock->setCallbacks(this);
    14901508
    14911509    return (bool) (d->serverSock);
     
    15581576                                             "echo \'would run the "
    15591577                                             "WakeServerCommand now, if "
    15601578                                             "set!\'");
    1561                 system(wol_cmd.ascii());
     1579                myth_system(wol_cmd);
    15621580
    15631581                VERBOSE(VB_GENERAL, QString("Waiting for %1 seconds until I "
    15641582                                            "try to reconnect again.")
  • libs/libmyth/mythmedia.cpp

     
    6565        return true;
    6666 
    6767    m_DeviceHandle = open(m_DevicePath, O_RDONLY | O_NONBLOCK);
    68    
     68
    6969    return isDeviceOpen();
    7070}
    7171
     
    311311        return (m_Status == MEDIASTAT_MOUNTED);
    312312
    313313    QFile Mounts(PATHTO_MOUNTS);
    314     char lpath[PATH_MAX];
     314    char lpath[PATH_MAX + 1];
     315    lpath[0] = 0;
    315316
    316317    // Try to open the mounts file so we can search it for our device.
    317318    if (Mounts.open(IO_ReadOnly))
     
    334335           
    335336            // Now lets see if we're mounted...
    336337            int len = readlink(DeviceName, lpath, PATH_MAX);
    337             if (len > 0 && len < PATH_MAX)
    338                 lpath[len] = 0;
     338            lpath[len] = 0;
    339339
    340340            if (m_DevicePath == DeviceName || m_DevicePath == lpath)
    341341            {