{
char *plugin_path = NULL;
DIR *dir = NULL;
- struct dirent dir_entry, *result = NULL;
+ struct dirent *dir_entry = NULL;
auth_adaptor_debug("Starting load plugins from directory");
}
int ret = AUTH_ADAPTOR_ERROR_NONE;
- while (0 == (readdir_r(dir, &dir_entry, &result))) {
-
- if (NULL == result) {
- auth_adaptor_error("Could not open directory %s", plugin_path);
- break;
- }
-
- if (dir_entry.d_type & DT_DIR) {
+ while (NULL != (dir_entry = readdir(dir))) {
+ if (dir_entry->d_type & DT_DIR) {
continue;
}
- plugin_path = g_strconcat(dir_path, "/", dir_entry.d_name, NULL);
+ plugin_path = g_strconcat(dir_path, "/", dir_entry->d_name, NULL);
auth_adaptor_plugin_h plugin = auth_adaptor_create_plugin(plugin_path);
if (NULL != plugin) {
char *plugin_path = NULL;
DIR *dir = NULL;
- struct dirent dir_entry, *result = NULL;
+ struct dirent *dir_entry = NULL;
if ((NULL == adaptor) || (NULL == dir_path)) {
contact_adaptor_error("Invalid argument");
}
int ret = CONTACT_ADAPTOR_ERROR_NONE;
- while (0 == (readdir_r(dir, &dir_entry, &result))) {
+ while (NULL != (dir_entry = readdir(dir))) {
- if (NULL == result) {
- contact_adaptor_error("Could not open directory %s", plugin_path);
- break;
- }
-
- if (dir_entry.d_type & DT_DIR) {
+ if (dir_entry->d_type & DT_DIR) {
continue;
}
- plugin_path = g_strconcat(dir_path, "/", dir_entry.d_name, NULL);
+ plugin_path = g_strconcat(dir_path, "/", dir_entry->d_name, NULL);
contact_adaptor_plugin_h plugin = contact_adaptor_create_plugin(plugin_path);
if (NULL != plugin) {
{
char *plugin_path = NULL;
DIR *dir = NULL;
- struct dirent dir_entry, *result = NULL;
+ struct dirent *dir_entry = NULL;
message_adaptor_debug("Starting load plugins from directory");
}
int ret = MESSAGE_ADAPTOR_ERROR_NONE;
- while (0 == (readdir_r(dir, &dir_entry, &result))) {
+ while (NULL != (dir_entry = readdir(dir))) {
- if (NULL == result) {
- message_adaptor_error("Could not open directory %s", plugin_path);
- break;
- }
-
- if (dir_entry.d_type & DT_DIR) {
+ if (dir_entry->d_type & DT_DIR) {
continue;
}
- plugin_path = g_strconcat(dir_path, "/", dir_entry.d_name, NULL);
+ plugin_path = g_strconcat(dir_path, "/", dir_entry->d_name, NULL);
message_adaptor_plugin_h plugin = message_adaptor_create_plugin(plugin_path);
if (NULL != plugin) {
char *plugin_path = NULL;
DIR *dir = NULL;
- struct dirent dir_entry, *result = NULL;
+ struct dirent *dir_entry = NULL;
if ((NULL == adaptor) || (NULL == dir_path)) {
push_adaptor_error("Invalid argument");
}
int ret = PUSH_ADAPTOR_ERROR_NONE;
- while (0 == (readdir_r(dir, &dir_entry, &result))) {
+ while (NULL != (dir_entry = readdir(dir))) {
- if (NULL == result) {
- push_adaptor_error("Could not open directory %s", plugin_path);
- break;
- }
-
- if (dir_entry.d_type & DT_DIR) {
+ if (dir_entry->d_type & DT_DIR) {
continue;
}
- plugin_path = g_strconcat(dir_path, "/", dir_entry.d_name, NULL);
+ plugin_path = g_strconcat(dir_path, "/", dir_entry->d_name, NULL);
push_adaptor_plugin_h plugin = push_adaptor_create_plugin(plugin_path);
if (NULL != plugin) {
{
char *plugin_path = NULL;
DIR *dir = NULL;
- struct dirent dir_entry, *result = NULL;
+ struct dirent *dir_entry = NULL;
shop_adaptor_debug("Starting load plugins from directory");
}
int ret = SHOP_ADAPTOR_ERROR_NONE;
- while (0 == (readdir_r(dir, &dir_entry, &result))) {
+ while (NULL != (dir_entry = readdir(dir))) {
- if (NULL == result) {
- shop_adaptor_error("Could not open directory %s", plugin_path);
- break;
- }
-
- if (dir_entry.d_type & DT_DIR) {
+ if (dir_entry->d_type & DT_DIR) {
continue;
}
- plugin_path = g_strconcat(dir_path, "/", dir_entry.d_name, NULL);
+ plugin_path = g_strconcat(dir_path, "/", dir_entry->d_name, NULL);
shop_adaptor_plugin_h plugin = shop_adaptor_create_plugin(plugin_path);
if (NULL != plugin) {
{
char *plugin_path = NULL;
DIR *dir = NULL;
- struct dirent dir_entry, *result = NULL;
+ struct dirent *dir_entry = NULL;
storage_adaptor_debug("Starting load plugins from directory");
}
int ret = STORAGE_ADAPTOR_ERROR_NONE;
- while (0 == (readdir_r(dir, &dir_entry, &result))) {
+ while (NULL != (dir_entry = readdir(dir))) {
- if (NULL == result) {
- storage_adaptor_error("Could not open directory %s", plugin_path);
- break;
- }
-
- if (dir_entry.d_type & DT_DIR) {
+ if (dir_entry->d_type & DT_DIR) {
continue;
}
- plugin_path = g_strconcat(dir_path, "/", dir_entry.d_name, NULL);
+ plugin_path = g_strconcat(dir_path, "/", dir_entry->d_name, NULL);
storage_adaptor_plugin_h plugin = storage_adaptor_create_plugin(plugin_path);
if (NULL != plugin) {
}
DIR *dirp = NULL;
- struct dirent dent, *result = NULL;
+ struct dirent *dent = NULL;
dirp = opendir(SERVICE_FILE_PUSH_PATH);
if (NULL == dirp) {
}
GList *_file_list = NULL;
- while (0 == readdir_r(dirp, &dent, &result)) {
- if (NULL == result) {
- break;
- }
- service_adaptor_debug_func("===== entry name [%s]", dent.d_name);
- if ((0 == strcmp(".", dent.d_name)) || (0 == strcmp("..", dent.d_name))) {
+ while (NULL != (dent = readdir(dirp))) {
+ service_adaptor_debug_func("===== entry name [%s]", dent->d_name);
+ if ((0 == strcmp(".", dent->d_name)) || (0 == strcmp("..", dent->d_name))) {
continue;
}
- char *file = strdup(dent.d_name);
+ char *file = strdup(dent->d_name);
if (NULL != file) {
_file_list = g_list_append(_file_list, (void *)file);
}