mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 22:26:32 +02:00
sipjreen: hopefully fix a bug that could happen with visible:false peers
This commit is contained in:
@@ -363,8 +363,7 @@ JabberPlugin::sendMsg(const QString& to, const QString& msg)
|
|||||||
sipMessage = new TomahawkSipMessage(m["ip"].toString(),
|
sipMessage = new TomahawkSipMessage(m["ip"].toString(),
|
||||||
m["port"].toInt(),
|
m["port"].toInt(),
|
||||||
m["uniqname"].toString(),
|
m["uniqname"].toString(),
|
||||||
m["key"].toString(),
|
m["key"].toString()
|
||||||
m["visible"].toBool()
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@@ -26,14 +26,14 @@ public:
|
|||||||
bool visible;
|
bool visible;
|
||||||
};
|
};
|
||||||
|
|
||||||
TomahawkSipMessage::TomahawkSipMessage(QString ip, unsigned int port, QString uniqname, QString key, bool visible) : d_ptr(new TomahawkSipMessagePrivate)
|
TomahawkSipMessage::TomahawkSipMessage(QString ip, unsigned int port, QString uniqname, QString key) : d_ptr(new TomahawkSipMessagePrivate)
|
||||||
{
|
{
|
||||||
Q_D(TomahawkSipMessage);
|
Q_D(TomahawkSipMessage);
|
||||||
d->ip = ip;
|
d->ip = ip;
|
||||||
d->port = port;
|
d->port = port;
|
||||||
d->uniqname = uniqname;
|
d->uniqname = uniqname;
|
||||||
d->key = key;
|
d->key = key;
|
||||||
d->visible = visible;
|
d->visible = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
TomahawkSipMessage::TomahawkSipMessage() : d_ptr(new TomahawkSipMessagePrivate)
|
TomahawkSipMessage::TomahawkSipMessage() : d_ptr(new TomahawkSipMessagePrivate)
|
||||||
|
@@ -11,7 +11,9 @@ class TomahawkSipMessage : public Jreen::StanzaExtension
|
|||||||
J_EXTENSION(TomahawkSipMessage, "")
|
J_EXTENSION(TomahawkSipMessage, "")
|
||||||
Q_DECLARE_PRIVATE(TomahawkSipMessage)
|
Q_DECLARE_PRIVATE(TomahawkSipMessage)
|
||||||
public:
|
public:
|
||||||
TomahawkSipMessage(QString ip, unsigned int port, QString uniqname, QString key, bool visible);
|
// sets visible to true
|
||||||
|
TomahawkSipMessage(QString ip, unsigned int port, QString uniqname, QString key);
|
||||||
|
|
||||||
// sets visible to false as we dont have any extra information
|
// sets visible to false as we dont have any extra information
|
||||||
TomahawkSipMessage();
|
TomahawkSipMessage();
|
||||||
~TomahawkSipMessage();
|
~TomahawkSipMessage();
|
||||||
|
@@ -120,5 +120,8 @@ void TomahawkSipMessageFactory::serialize(StanzaExtension *extension, QXmlStream
|
|||||||
|
|
||||||
StanzaExtension::Ptr TomahawkSipMessageFactory::createExtension()
|
StanzaExtension::Ptr TomahawkSipMessageFactory::createExtension()
|
||||||
{
|
{
|
||||||
return StanzaExtension::Ptr(new TomahawkSipMessage(m_ip, m_port, m_uniqname, m_key, m_visible));
|
if(m_visible)
|
||||||
|
return StanzaExtension::Ptr(new TomahawkSipMessage(m_ip, m_port, m_uniqname, m_key));
|
||||||
|
else
|
||||||
|
return StanzaExtension::Ptr(new TomahawkSipMessage());
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user