nlsr.c: updated main event loop.