ObjFW  Diff

Differences From Artifact [c60b82a6b2]:

To Artifact [15c765674a]:


1867
1868
1869
1870
1871
1872
1873

1874
1875
1876
1877
1878
1879



1880
1881
1882
1883
1884
1885
1886
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890







+






+
+
+







	    nil, nil, nil, query->_context, exception);
}

-	  (bool)socket: (OF_KINDOF(OFUDPSocket *))sock
  didReceiveIntoBuffer: (void *)buffer_
		length: (size_t)length
		sender: (of_socket_address_t)sender
	     exception: (id)exception
{
	unsigned char *buffer = buffer_;
	OFDictionary *answerRecords = nil, *authorityRecords = nil;
	OFDictionary *additionalRecords = nil;
	OFNumber *ID;
	OFDNSResolverQuery *query;

	if (exception != nil)
		return true;

	if (length < 2)
		/* We can't get the ID to get the query. Ignore packet. */
		return true;

	ID = [OFNumber numberWithUInt16: (buffer[0] << 8) | buffer[1]];
	query = [[[_queries objectForKey: ID] retain] autorelease];
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2012
2013
2014
2015
2016
2017
2018







2019
2020
2021
2022
2023
2024
2025







-
-
-
-
-
-
-







	callback(query->_target, query->_selector, self, query->_domainName,
	    answerRecords, authorityRecords, additionalRecords,
	    query->_context, nil);

	return true;
}

-		   (void)socket: (OF_KINDOF(OFUDPSocket *))sock
  didFailToReceiveWithException: (id)exception
{
	[sock asyncReceiveIntoBuffer: _buffer
			      length: BUFFER_LENGTH];
}

- (void)asyncResolveSocketAddressesForHost: (OFString *)host
				    target: (id)target
				  selector: (SEL)selector
				   context: (id)context
{
	[self asyncResolveSocketAddressesForHost: host
				   addressFamily: OF_SOCKET_ADDRESS_FAMILY_ANY