openchange/openchange — pull request #113 by blaxter (2014-10-16 18:28:40+00:00)
Title: Fix current mapitest: module_zentyal

There were 2 issues executing `mapitest --mapi-calls=ZENTYAL-ALL`:

* In 1863 `Administrator` user were being used (and normally this user won't have an openchange account), we can use the user from the profile which will have oc account acitvated for sure.
* 1872 test was giving sometime sigfaults because a bug (the original one) on nspi implementation
* We were never setting `count` to 0, because `((ldb_res->count - r->in.pStat->NumPos) < 0)` is checking whether an `uint32_t` is < 0.
* The test was sigfaulting because of `ldb_res->msgs[i+r->in.pStat->NumPos]` (NumPos is the faulty parameter we supply)
* Besides we want to return an error instead of empty result and success result.