emsabp_property: Fix PropTag mapping when resolving PropTag to attribute name

With this fix, no matter what the type of input PropTag is,
we are going to search both for Ansi and Unicode version.

Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
dcesrv/spiGetProps: Move code to make PtypError property values in separate function

Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
dcesrv/NspiQueryRows: Return PtypError prop values when we can't find MId requested

NspiQueryRows should behave like NspiGetProps when MId can't be resolved.
See: 3.1.4.1.8 NspiQueryRows

Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
emsmdb: emsmdbp_object_get_fid_by_name should use current mailbox username

Using session username (eg. emsmdbp_ctx->username) is wrong as
we may have parent_object opened in different mailbox

Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
emsmdb: Use mailbox->owner_username in emsmdbp_object_open_folder()

Using session username (eg. emsmdbp_ctx->username) is wrong as
we may have parent_object opened in different mailbox

Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
emsmdb: Use mailbox->owner_username in emsmdbp_object_get_properties_mailbox()

Using session username (eg. emsmdbp_ctx->username) is wrong as
we may have parent_object opened in different mailbox

Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
emsmdb: Extend emsmdbp_get_parent_fid() to accep and use mailbox object
for 'fid' to get parent of

FID are not unique for the whole system anymore.
NOTE: This patch assumes that FIDs are unique at least
for user's mailbox

Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
emsmdb: Use mailbox context in emsmdbp_object_open_folder_by_fid()
to resolve FIDs

FIDs are no more unique for whole system but rather that unique
in context of the mailbox

Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
emsmdb: emsmdbp_object_open_folder_by_fid - remove obscure 'else' and add sanity checks
on input parameters

Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
emsmdb: emsmdbp_object_open_folder_by_fid - move local variable into local context

Keeping 'parent_object' into per-function context, although it is not
globally used, may lead to hard times debugging after fixing something

Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
Merge pull request #49 from Zentyal/kamenim/zen-master-fix-open-shared-calendar

Fix Opening for shared calendar