@@ -842,7 +842,7 @@ ec_error_t zs_openentry(GUID hsession, BINARY entryid,
842842 &b_private, &account_id, &folder_id))
843843 break ;
844844 auto handle = pinfo->ptree ->get_store_handle (b_private, account_id);
845- if (zh_error (handle))
845+ if (zh_is_error (handle))
846846 return zh_error (handle);
847847 pinfo.reset ();
848848 return zs_openstoreentry (hsession,
@@ -854,7 +854,7 @@ ec_error_t zs_openentry(GUID hsession, BINARY entryid,
854854 &b_private, &account_id, &folder_id, &message_id))
855855 break ;
856856 auto handle = pinfo->ptree ->get_store_handle (b_private, account_id);
857- if (zh_error (handle))
857+ if (zh_is_error (handle))
858858 return zh_error (handle);
859859 pinfo.reset ();
860860 return zs_openstoreentry (hsession,
@@ -1030,7 +1030,7 @@ ec_error_t zs_openstoreentry(GUID hsession, uint32_t hobject, BINARY entryid,
10301030 if (pmessage == nullptr )
10311031 return ecError;
10321032 *phobject = pinfo->ptree ->add_object_handle (hobject, {zs_objtype::message, std::move (pmessage)});
1033- if (zh_error (*phobject))
1033+ if (zh_is_error (*phobject))
10341034 return zh_error (*phobject);
10351035 *pmapi_type = zs_objtype::message;
10361036 } else {
@@ -1084,7 +1084,7 @@ ec_error_t zs_openstoreentry(GUID hsession, uint32_t hobject, BINARY entryid,
10841084 if (pfolder == nullptr )
10851085 return ecError;
10861086 *phobject = pinfo->ptree ->add_object_handle (hobject, {zs_objtype::folder, std::move (pfolder)});
1087- if (zh_error (*phobject))
1087+ if (zh_is_error (*phobject))
10881088 return zh_error (*phobject);
10891089 *pmapi_type = zs_objtype::folder;
10901090 }
@@ -1126,7 +1126,7 @@ ec_error_t zs_openabentry(GUID hsession,
11261126 return ecError;
11271127 *pmapi_type = zs_objtype::abcont;
11281128 *phobject = pinfo->ptree ->add_object_handle (ROOT_HANDLE, {*pmapi_type, std::move (contobj)});
1129- if (zh_error (*phobject))
1129+ if (zh_is_error (*phobject))
11301130 return zh_error (*phobject);
11311131 return ecSuccess;
11321132 }
@@ -1237,7 +1237,7 @@ static ec_error_t zs_openab_emsab(USER_INFO_REF &&pinfo, BINARY entryid,
12371237 } else {
12381238 return ecInvalidParam;
12391239 }
1240- if (zh_error (*phobject))
1240+ if (zh_is_error (*phobject))
12411241 return zh_error (*phobject);
12421242 return ecSuccess;
12431243}
@@ -1639,7 +1639,7 @@ ec_error_t zs_createmessage(GUID hsession,
16391639 auto folder_id = pfolder->folder_id ;
16401640 auto pstore = pfolder->pstore ;
16411641 auto hstore = pinfo->ptree ->get_store_handle (pstore->b_private , pstore->account_id );
1642- if (zh_error (hstore))
1642+ if (zh_is_error (hstore))
16431643 return zh_error (hstore);
16441644 if (!pstore->owner_mode ()) {
16451645 if (!exmdb_client->get_folder_perm (pstore->get_dir (),
@@ -2142,7 +2142,7 @@ ec_error_t zs_createfolder(GUID hsession, uint32_t hparent_folder,
21422142 because the caller normally will not keep the
21432143 handle of parent folder */
21442144 auto hstore = pinfo->ptree ->get_store_handle (TRUE , pstore->account_id );
2145- if (zh_error (hstore))
2145+ if (zh_is_error (hstore))
21462146 return zh_error (hstore);
21472147 *phobject = pinfo->ptree ->add_object_handle (hstore, {zs_objtype::folder, std::move (pfolder)});
21482148 } else {
@@ -3826,7 +3826,7 @@ ec_error_t zs_openembedded(GUID hsession,
38263826 return ecNotSupported;
38273827 auto pstore = pattachment->get_store ();
38283828 auto hstore = pinfo->ptree ->get_store_handle (pstore->b_private , pstore->account_id );
3829- if (zh_error (hstore))
3829+ if (zh_is_error (hstore))
38303830 return zh_error (hstore);
38313831 auto b_writable = pattachment->writable ();
38323832 auto tag_access = pattachment->get_tag_access ();
@@ -4073,7 +4073,7 @@ ec_error_t zs_hierarchysync(GUID hsession, uint32_t hfolder, uint32_t *phobject)
40734073 return ecNotSupported;
40744074 auto pstore = pfolder->pstore ;
40754075 auto hstore = pinfo->ptree ->get_store_handle (pstore->b_private , pstore->account_id );
4076- if (zh_error (hstore))
4076+ if (zh_is_error (hstore))
40774077 return zh_error (hstore);
40784078 auto pctx = icsdownctx_object::create (pfolder, SYNC_TYPE_HIERARCHY);
40794079 if (pctx == nullptr )
@@ -4095,7 +4095,7 @@ ec_error_t zs_contentsync(GUID hsession, uint32_t hfolder, uint32_t *phobject)
40954095 return ecNotSupported;
40964096 auto pstore = pfolder->pstore ;
40974097 auto hstore = pinfo->ptree ->get_store_handle (pstore->b_private , pstore->account_id );
4098- if (zh_error (hstore))
4098+ if (zh_is_error (hstore))
40994099 return zh_error (hstore);
41004100 auto pctx = icsdownctx_object::create (pfolder, SYNC_TYPE_CONTENTS);
41014101 if (pctx == nullptr )
@@ -4229,7 +4229,7 @@ ec_error_t zs_hierarchyimport(GUID hsession,
42294229 return ecNotSupported;
42304230 auto pstore = pfolder->pstore ;
42314231 auto hstore = pinfo->ptree ->get_store_handle (pstore->b_private , pstore->account_id );
4232- if (zh_error (hstore))
4232+ if (zh_is_error (hstore))
42334233 return zh_error (hstore);
42344234 auto pctx = icsupctx_object::create (pfolder, SYNC_TYPE_HIERARCHY);
42354235 if (pctx == nullptr )
@@ -4251,7 +4251,7 @@ ec_error_t zs_contentimport(GUID hsession, uint32_t hfolder, uint32_t *phobject)
42514251 return ecNotSupported;
42524252 auto pstore = pfolder->pstore ;
42534253 auto hstore = pinfo->ptree ->get_store_handle (pstore->b_private , pstore->account_id );
4254- if (zh_error (hstore))
4254+ if (zh_is_error (hstore))
42554255 return zh_error (hstore);
42564256 auto pctx = icsupctx_object::create (pfolder, SYNC_TYPE_CONTENTS);
42574257 if (pctx == nullptr )
@@ -5152,7 +5152,7 @@ ec_error_t zs_linkmessage(GUID hsession,
51525152 if (pinfo == nullptr )
51535153 return ecError;
51545154 auto handle = pinfo->ptree ->get_store_handle (b_private, account_id);
5155- if (zh_error (handle))
5155+ if (zh_is_error (handle))
51565156 return zh_error (handle);
51575157 if (pinfo->user_id < 0 )
51585158 return ecAccessDenied;
0 commit comments