processone/ejabberd — pull request #27 by brendonh (2012-02-21 01:42:14+00:00)
Title: NULL handling in gen_storage_odbc

Using `{auth_storage, odbc}`, `{auth_password_format, plain}`, and Postgres, I noticed that it was trying to insert rows into passwd with the string "undefined" in storedkey, serverkey, salt, and iterationcount.

This tiny commit translates `undefined` to "NULL" in gen_storage_odbc writes, and conversely `null` to `undefined` in reads.

I was also getting a bunch of format crashes in debug prints which I've fixed with iolist_to_binary.