fixed snarlnetwork
This commit is contained in:
parent
d4a32756e5
commit
93ac5e13fb
|
@ -114,7 +114,7 @@ QStringList FreedesktopNotification_Frontend::GetCapabilities()
|
|||
QString FreedesktopNotification_Frontend::GetServerInformation(QString& vendor, QString& version, QString& specVersion)
|
||||
{
|
||||
vendor = "Snore";
|
||||
version = "0.01";
|
||||
version = snore()->version();
|
||||
specVersion = "0";
|
||||
return "Snore";
|
||||
}
|
||||
|
|
|
@ -74,17 +74,17 @@ void SnarlNetworkFrontend::handleMessages(){
|
|||
if(s == "")
|
||||
continue;
|
||||
SnarlNotification noti=parser->parse(s,client);
|
||||
notifications.insert(noti.notification->id(),noti);
|
||||
if(!noti.vailid)
|
||||
continue;
|
||||
if(noti.notification->isNotification()){
|
||||
snore()->broadcastNotification(noti.notification);
|
||||
if(noti.notification->id()!=0){
|
||||
out+="/"+QString::number(noti.notification->id())+"\r\n";
|
||||
out+="/"+QString::number(noti.notification->id());
|
||||
notifications.insert(noti.notification->id(),noti);
|
||||
}
|
||||
}else{
|
||||
out+="\r\n";
|
||||
}
|
||||
out+="\r\n";
|
||||
|
||||
client->write(out.toLatin1());
|
||||
if(noti.httpClient){
|
||||
client->disconnectFromHost();
|
||||
|
@ -95,7 +95,6 @@ void SnarlNetworkFrontend::handleMessages(){
|
|||
}
|
||||
|
||||
void SnarlNetworkFrontend::callback(const SnarlNotification &sn,QString msg){
|
||||
qDebug()<<"SnarlNetwork callback:"<<sn.notification->id();
|
||||
notifications.remove(sn.notification->id());
|
||||
if(sn.clientSocket!=NULL&&!msg.isEmpty()){
|
||||
msg+=QString::number(sn.notification->id());
|
||||
|
|
Loading…
Reference in New Issue