  
  	for (dp = gpsd_drivers; *dp; dp++) {
 -- 
-2.23.0
-
+2.27.0.rc0
+

+	sq.sq_port = pds_port;
+	ret = connect(sock, (struct sockaddr *)&sq, sizeof(sq));
+	if (ret < 0) {
+		gpsd_log(&session->context->errout, LOG_ERROR,
+			 "QRTR open: Failed to connect socket.\n");
+		close(sock);
+		return -1;

+
+		if (sl != sizeof(sq) || sq.sq_node != sq_ctrl.sq_node ||
+		    sq.sq_port != sq_ctrl.sq_port) {
+			GPSD_LOG(LOG_ERROR, &session->context->errout,
+				 "QRTR open: Received message is not ctrl message, ignoring.\n");
+			continue;
+		}
