What do these status codes mean?  Would be better to define macros so that they weren't just magic numbers.