Skip to content

Commit

Permalink
Convert WakeOnLAN to use QUdpSocket instead of Qt3 based MSocketDevice.
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-kristjansson committed Oct 11, 2012
1 parent 52a8f4b commit c51b333
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions mythtv/libs/libmythbase/mythmiscutil.cpp
Expand Up @@ -37,6 +37,7 @@ using namespace std;
#include <QReadWriteLock>
#include <QNetworkProxy>
#include <QStringList>
#include <QUdpSocket>
#include <QFileInfo>
#include <QFile>
#include <QDir>
Expand All @@ -46,7 +47,6 @@ using namespace std;
#include "mythcorecontext.h"
#include "exitcodes.h"
#include "mythlogging.h"
#include "msocketdevice.h"
#include "mythsocket.h"
#include "mythcoreutil.h"
#include "mythsystem.h"
Expand Down Expand Up @@ -670,11 +670,9 @@ bool WakeOnLAN(QString MAC)
LOG(VB_NETWORK, LOG_INFO,
QString("WakeOnLan(): Sending WOL packet to %1").arg(MAC));

MSocketDevice socket(MSocketDevice::Datagram);
socket.setBroadcast(true);
socket.writeBlock(msg, msglen, QHostAddress("255.255.255.255"), 32767);

return true;
QUdpSocket udp_socket;
return udp_socket.writeDatagram(
msg, msglen, QHostAddress::Broadcast, 32767) == msglen;
}

bool IsPulseAudioRunning(void)
Expand Down

0 comments on commit c51b333

Please sign in to comment.