Ack from me, however if you do not like the if statement inside the loop
you can also change it to be:
while (true) {
status = ....
if (status != NSS_STATUS_TRYAGAIN) {
break;
}
....
}
Also looking at this loop I see a potential for infinite loop in case
something goes wrong and the internal call keeps returning
NSS_STATUS_TRYAGAIN.
If we want to address that issue, we may want to change the condition to
exit the loop to be a time based condition, something like:
enter_time = time(NULL);
while (enter_time + timeout < time(NULL) {
status = ....
if (status != NSS_STATUS_TRYAGAIN) {
break;
}
....
}
if status == NSS_STATUS_TRYAGAIN -> error
I would like to see this (maybe in a separate patch on top of your
current patch, as the proxy provider is synchronous already so not
allowing it to loop for too long is a necessary condition to avoid
having the monitor kill it.
But I would like to know what other think about this. A very slow nss
module may end up having it's call killed midair ...
Simo.
--
Simo Sorce * Red Hat, Inc * New York