[SCM] kdeconnect packaging branch, master, updated. debian/0.9g-1-1183-g9d69498
Maximiliano Curia
maxy at moszumanska.debian.org
Fri Oct 14 14:27:55 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/kdeconnect.git;a=commitdiff;h=5cf6fe8
The following commit has been merged in the master branch:
commit 5cf6fe82b5dc240361133caae7a76e66d45a4ab2
Author: Albert Vaca <albertvaka at gmail.com>
Date: Wed Sep 17 16:22:23 2014 +0200
Fixed possible causes of a crash in LanLinkProvider::configureSocket l.48
BUG: 338662
---
core/backends/lan/lanlinkprovider.cpp | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/core/backends/lan/lanlinkprovider.cpp b/core/backends/lan/lanlinkprovider.cpp
index aa8350a..22dcb04 100644
--- a/core/backends/lan/lanlinkprovider.cpp
+++ b/core/backends/lan/lanlinkprovider.cpp
@@ -44,13 +44,17 @@ void LanLinkProvider::configureSocket(QTcpSocket* socket)
#endif
#ifdef TCP_KEEPCNT
- int count = 3; // send up to 3 keepalive packets out, then disconnect if no response
- setsockopt(fd, getprotobyname("TCP")->p_proto, TCP_KEEPCNT, &count, sizeof(count));
+ if (getprotobyname("TCP")) {
+ int count = 3; // send up to 3 keepalive packets out, then disconnect if no response
+ setsockopt(fd, getprotobyname("TCP")->p_proto, TCP_KEEPCNT, &count, sizeof(count));
+ }
#endif
#ifdef TCP_KEEPINTVL
- int interval = 5; // send a keepalive packet out every 2 seconds (after the 5 second idle period)
- setsockopt(fd, getprotobyname("TCP")->p_proto, TCP_KEEPINTVL, &interval, sizeof(interval));
+ if (getprotobyname("TCP")) {
+ int interval = 5; // send a keepalive packet out every 2 seconds (after the 5 second idle period)
+ setsockopt(fd, getprotobyname("TCP")->p_proto, TCP_KEEPINTVL, &interval, sizeof(interval));
+ }
#endif
}
@@ -168,6 +172,8 @@ void LanLinkProvider::connected()
QTcpSocket* socket = qobject_cast<QTcpSocket*>(sender());
+ if (!socket) return;
+
disconnect(socket, SIGNAL(connected()), this, SLOT(connected()));
disconnect(socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(connectError()));
--
kdeconnect packaging
More information about the pkg-kde-commits
mailing list