Revision
23337
Author
zarzycki@apple.com
Date
2007-08-14 13:13:00 -0700 (Tue, 14 Aug 2007)

Log Message

Sanity checks.

Modified Paths

Diff

Modified: trunk/launchd/src/launchd_core_logic.c (23336 => 23337)


--- trunk/launchd/src/launchd_core_logic.c	2007-08-14 18:07:16 UTC (rev 23336)
+++ trunk/launchd/src/launchd_core_logic.c	2007-08-14 20:13:00 UTC (rev 23337)
@@ -1832,7 +1832,7 @@
 	struct machservice *ms;
 
 	LIST_FOREACH(ms, &port_hash[HASH_PORT(p)], port_hash_sle) {
-		if (ms->port == p) {
+		if (ms->recv && (ms->port == p)) {
 			return ms->job;
 		}
 	}
@@ -4342,7 +4342,7 @@
 	struct machservice *ms;
 
 	LIST_FOREACH(ms, &port_hash[HASH_PORT(p)], port_hash_sle) {
-		if (ms->port == p) {
+		if (ms->recv && (ms->port == p)) {
 			break;
 		}
 	}