This is good (though you mean you've added "ad_port", and haven't replaced the very useful "ad_proc" :) I'm still wondering about AOLserver's ability to return the port natively. Nitpicking, I was annoyed by the API not working correctly and wonder if it works correctly today.
(Yes, I could check this myself, but I might ask you to take on a few of my existing OpenACS tasks as compensation if you ask me to do it!)