Diff between 8d23082905394e2a6d7d8c5ad334c6c14d2216de and 4b16d594be1134d287b0fb5d83c4c8c73c8427be

Changed Files

File Additions Deletions Status
profiles/network/bnep.c +5 -1 modified

Full Patch

diff --git a/profiles/network/bnep.c b/profiles/network/bnep.c
index 4dde557..7e777e2 100644
--- a/profiles/network/bnep.c
+++ b/profiles/network/bnep.c
@@ -255,7 +255,11 @@ static gboolean bnep_setup_cb(GIOChannel *chan, GIOCondition cond,
 
 	memset(&timeo, 0, sizeof(timeo));
 	timeo.tv_sec = 0;
-	setsockopt(sk, SOL_SOCKET, SO_RCVTIMEO, &timeo, sizeof(timeo));
+	if (setsockopt(sk, SOL_SOCKET, SO_RCVTIMEO, &timeo,
+							sizeof(timeo)) < 0) {
+		error("bnep: Set setsockopt failed: %s", strerror(errno));
+		goto failed;
+	};
 
 	sk = g_io_channel_unix_get_fd(session->io);
 	if (bnep_connadd(sk, session->src, session->iface) < 0)