repositories
/
deb_shairplay.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move hwaddress to raop_start instead of raop_init.
[deb_shairplay.git]
/
AirTV-Qt
/
raopservice.cpp
diff --git
a/AirTV-Qt/raopservice.cpp
b/AirTV-Qt/raopservice.cpp
index 43689c3e7118c42a54e2f28d5d1332db57a2f1e1..19ba624c480438311c92b99849b891e64ee02c3e 100644
(file)
--- a/
AirTV-Qt/raopservice.cpp
+++ b/
AirTV-Qt/raopservice.cpp
@@
-80,6
+80,7
@@
RaopService::~RaopService()
bool RaopService::init()
{
const char hwaddr[] = { 0x48, 0x5d, 0x60, 0x7c, 0xee, 0x22 };
bool RaopService::init()
{
const char hwaddr[] = { 0x48, 0x5d, 0x60, 0x7c, 0xee, 0x22 };
+
raop_callbacks_t raop_cbs;
int error;
raop_callbacks_t raop_cbs;
int error;
@@
-106,7
+107,7
@@
bool RaopService::init()
QByteArray array = file.read(file.size());
array.append('\0');
QByteArray array = file.read(file.size());
array.append('\0');
- m_raop = raop_init(&raop_cbs, array.data()
, hwaddr, sizeof(hwaddr)
);
+ m_raop = raop_init(&raop_cbs, array.data());
if (!m_raop) {
return false;
}
if (!m_raop) {
return false;
}
@@
-123,12
+124,14
@@
bool RaopService::init()
bool RaopService::start(const QString & name, quint16 port)
{
bool RaopService::start(const QString & name, quint16 port)
{
+ const char hwaddr[] = { 0x48, 0x5d, 0x60, 0x7c, 0xee, 0x22 };
+
if (!m_raop || !m_dnssd || m_thread.isRunning()) {
return false;
}
m_thread.start();
if (!m_raop || !m_dnssd || m_thread.isRunning()) {
return false;
}
m_thread.start();
- if (raop_start(m_raop, &port) < 0) {
+ if (raop_start(m_raop, &port
, hwaddr, sizeof(hwaddr)
) < 0) {
m_thread.quit();
m_thread.wait();
return false;
m_thread.quit();
m_thread.wait();
return false;