Fix potential problems uncovered with gcc -Wextra.

Bug: http://tracker.openchange.org/issues/421

Signed-off-by: Jelmer Vernooij <jelmer@openchange.org>
Error out rather than segfault when incomplete session is passed to emsmdb_transaction_wrapper.

Bug: http://tracker.openchange.org/issues/422

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Check for ndr_pull_mapi2k7_response failing.

Bug: http://tracker.openchange.org/issues/420

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Convert ndr errors to NTSTATUS rather than just returning NT_STATUS_UNSUCCESSFUL.

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>