Dave Mielke <[email protected]> writes: >>The initializeMethodDescriptors code from Programs/auth.c is very >>simple. If any method descriptor fails to initialize, then all of them >>are released, and the auth server will not start. > > Is this really what we want, then? Mightn't it be better that we only require > one of them to succeed?
I'd say one of them succeeding should be good enough. It's going to complicate the code a little more, because now we have to keep track of both the methods listed in the auth parameter string and the methods that were successfully initialized. I see a couple options. 1. Make auth->methods a linked list. Only add a MethodDescriptor to the list if the descriptor was successfully initialized. If the list is empty at the end of initializeMethodDescriptors, then bail, since nothing will work. 2. Add a boolean is_initialized flag to each MethodDescriptor, or use NULL MethodDescriptor pointers to indicate uninitialized MethodDescriptors. Then, we have to check to make sure a MethodDescriptor is initialized before trying to use it. If we only require one to succeed, we should at least emit a warning message to the logs indicating the failures. -- Chris _______________________________________________ This message was sent via the BRLTTY mailing list. To post a message, send an e-mail to: [email protected] For general information, go to: http://brltty.com/mailman/listinfo/brltty
