ObjXMPP  Check-in [20cf4eff73]

Overview
Comment:Don't throw an exception if SRV records don't exist
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 20cf4eff732ff5af3ffcf6314c91a7f6c4dd2fa2a4106fa37a5b55e10afce952
User & Date: florob@babelmonkeys.de on 2011-05-27 14:52:27
Other Links: manifest | tags
Context
2011-06-05
20:07
Adjust to API change. check-in: b570a39e78 user: js tags: trunk
2011-05-27
14:52
Don't throw an exception if SRV records don't exist check-in: 20cf4eff73 user: florob@babelmonkeys.de tags: trunk
00:17
Separate server (where to connect to) and domain (what that server hosts) check-in: 206960e7ca user: florob@babelmonkeys.de tags: trunk
Changes

Modified src/XMPPSRVLookup.m from [d049955436] to [9b4d1e1b78].

212
213
214
215
216
217
218



219
220
221
222
223

224
225
226
227
228
229
230
				  socket: nil
				    host: domain];

		answer = [self allocMemoryWithSize: of_pagesize];
		answerLen = res_nsearch(&resState, [request cString], ns_c_in,
		    ns_t_srv, answer, (int)of_pagesize);




		if (answerLen < 1 || answerLen > of_pagesize)
			@throw [OFAddressTranslationFailedException
			    newWithClass: isa
				  socket: nil
				    host: domain];


		if (ns_initparse(answer, answerLen, &handle))
			@throw [OFAddressTranslationFailedException
			    newWithClass: isa
				  socket: nil
				    host: domain];








>
>
>
|




>







212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
				  socket: nil
				    host: domain];

		answer = [self allocMemoryWithSize: of_pagesize];
		answerLen = res_nsearch(&resState, [request cString], ns_c_in,
		    ns_t_srv, answer, (int)of_pagesize);

		if ((answerLen == -1) && (h_errno == HOST_NOT_FOUND))
			return;

		if (answerLen < 1 || answerLen > of_pagesize) {
			@throw [OFAddressTranslationFailedException
			    newWithClass: isa
				  socket: nil
				    host: domain];
		}

		if (ns_initparse(answer, answerLen, &handle))
			@throw [OFAddressTranslationFailedException
			    newWithClass: isa
				  socket: nil
				    host: domain];