@Mario1: Is this a good place to post code? Should it go in a separate thread with only a link here?
I moved the previous code that I had posted here back to this thread:
I just discovered that my program only worked in my kindle debian build environment. It *was* working when called by launchpad, so something changed when I cleaned it up. I will repost when I get it working right...
UPDATE: I figured out the problem -- an unused buffer pointer in the ua structure was no longer set to NULL.