changeset 32314:9ed25c58e7ce

A while ago I noticed that we don't have enforce a max on the number of processes that we fork to do DNS SRV or TXT lookups. This is pretty minor and I don't care enough to fix it, but it seems like a good idea to mention it in the code.
author Mark Doliner <mark@kingant.net>
date Sun, 21 Aug 2011 00:54:23 +0000
parents a5c9f3c2352e
children c2fa3a76a0be
files libpurple/dnssrv.c
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/dnssrv.c	Sun Aug 21 00:50:52 2011 +0000
+++ b/libpurple/dnssrv.c	Sun Aug 21 00:54:23 2011 +0000
@@ -798,6 +798,12 @@
 		return NULL;
 	}
 
+	/*
+	 * TODO: We should put a cap on the number of forked processes that we
+	 *       allow at any given time.  If we get too many requests they
+	 *       should be put into a queue and handled later.  (This is what
+	 *       we do for A record lookups.)
+	 */
 	pid = fork();
 	if (pid == -1) {
 		purple_debug_error("dnssrv", "Could not create process!\n");
@@ -929,6 +935,12 @@
 		return NULL;
 	}
 
+	/*
+	 * TODO: We should put a cap on the number of forked processes that we
+	 *       allow at any given time.  If we get too many requests they
+	 *       should be put into a queue and handled later.  (This is what
+	 *       we do for A record lookups.)
+	 */
 	pid = fork();
 	if (pid == -1) {
 		purple_debug_error("dnssrv", "Could not create process!\n");