#include "pkgmgr-server.h"
#include "package-manager.h"
+#define RETRY_MAX 5
+#define RETRY_WAIT_USEC (1000000 / 2) /* 0.5 sec */
#define PKGMGR_DBUS_SERVICE "org.tizen.pkgmgr"
#define PKGMGR_DBUS_OBJECT_PATH "/org/tizen/pkgmgr"
{
GumUser *guser;
GumUserType ut = GUM_USERTYPE_NONE;
+ int retry_cnt = 0;
+
+ do {
+ guser = gum_user_get_sync(uid, FALSE);
+ if (guser == NULL) {
+ ERR("cannot get user information from gumd, retry");
+ retry_cnt++;
+ usleep(RETRY_WAIT_USEC);
+ continue;
+ }
+ break;
+ } while (retry_cnt <= RETRY_MAX);
- guser = gum_user_get_sync(uid, FALSE);
if (guser == NULL) {
- ERR("cannot get user information from gumd");
+ ERR("cannot get user information from gumd, failed");
return -1;
}