growl agent should handle port busy

if the port can't be bound, die cleanly.
FIXES 126812

Change-Id: I6523f18c2b5f5bacfbd11d08736b9af14fa666e2
Reviewed-on: http://gerrit.openafs.org/1651
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
Derrick Brashear 2010-03-24 14:49:11 -04:00
parent 37eeead346
commit af41515608

View File

@ -223,10 +223,16 @@ int main(int argc, const char **argv) {
CFSocketContext MarinerSocketContext = {0, (void *)&growlContext, NULL, NULL, NULL };
CFSocketRef MarinerSocket = CFSocketCreateWithSocketSignature(kCFAllocatorDefault, &MarinerSignature, kCFSocketReadCallBack, &MySocketReadCallBack, &MarinerSocketContext);
if (!MarinerSocket)
goto fail;
CFSocketSetSocketFlags(MarinerSocket, kCFSocketCloseOnInvalidate|kCFSocketAutomaticallyReenableReadCallBack);
CFRunLoopSourceRef MarinerRunLoopSource = CFSocketCreateRunLoopSource(NULL, MarinerSocket, 0);
if (!MarinerRunLoopSource)
goto fail;
CFRunLoopAddSource(CFRunLoopGetCurrent(), MarinerRunLoopSource, kCFRunLoopCommonModes);
/* Run the run loop until it is manually cancelled */
@ -236,6 +242,7 @@ int main(int argc, const char **argv) {
CFRelease(MarinerRunLoopSource);
CFSocketInvalidate(MarinerSocket);
CFRelease(MarinerSocket);
fail:
/* CFRelease(notificationInfo); */
[pool release];