ObjFW  Diff

Differences From Artifact [3af99bcca7]:

To Artifact [476e39eb2a]:


674
675
676
677
678
679
680
681

682
683

684
685
686

687
688

689
690
691
692
693
694
695
674
675
676
677
678
679
680

681
682

683
684
685

686
687

688
689
690
691
692
693
694
695







-
+

-
+


-
+

-
+







- (void)setMinNumberOfDotsInAbsoluteName:
    (unsigned int)minNumberOfDotsInAbsoluteName
{
	_settings->_minNumberOfDotsInAbsoluteName =
	    minNumberOfDotsInAbsoluteName;
}

- (bool)usesTCP
- (bool)forcesTCP
{
	return _settings->_usesTCP;
	return _settings->_forcesTCP;
}

- (void)setUsesTCP: (bool)usesTCP
- (void)setForcesTCP: (bool)forcesTCP
{
	_settings->_usesTCP = usesTCP;
	_settings->_forcesTCP = forcesTCP;
}

- (OFTimeInterval)configReloadInterval
{
	return _settings->_configReloadInterval;
}

719
720
721
722
723
724
725
726

727
728
729
730
731
732
733
719
720
721
722
723
724
725

726
727
728
729
730
731
732
733







-
+







		     repeats: false];
	[[OFRunLoop currentRunLoop] addTimer: context->_cancelTimer
				     forMode: runLoopMode];

	nameServer = [context->_settings->_nameServers
	    objectAtIndex: context->_nameServersIndex];

	if (context->_settings->_usesTCP) {
	if (context->_settings->_forcesTCP) {
		OFEnsure(context->_TCPSocket == nil);

		context->_TCPSocket = [[OFTCPSocket alloc] init];
		[_TCPQueries setObject: context forKey: context->_TCPSocket];

		context->_TCPSocket.delegate = self;
		[context->_TCPSocket asyncConnectToHost: nameServer
944
945
946
947
948
949
950
951

952
953
954

955
956
957
958
959
960
961
944
945
946
947
948
949
950

951
952
953

954
955
956
957
958
959
960
961







-
+


-
+







		if ((buffer[2] & 0x78) != (queryDataBuffer[2] & 0x78))
			@throw [OFInvalidServerResponseException exception];

		/* TC */
		if (buffer[2] & 0x02) {
			OFRunLoopMode runLoopMode;

			if (context->_settings->_usesTCP)
			if (context->_settings->_forcesTCP)
				@throw [OFTruncatedDataException exception];

			context->_settings->_usesTCP = true;
			context->_settings->_forcesTCP = true;
			runLoopMode = [OFRunLoop currentRunLoop].currentMode;
			[self of_sendQueryForContext: context
					 runLoopMode: runLoopMode];
			return false;
		}

		/* RCODE */