parent
bea73e88bd
commit
acc688873b
|
@ -78,7 +78,7 @@ _ethumb_plugin_list_cb(Eina_Module *m, void *data __UNUSED__)
|
||||||
file = eina_module_file_get(m);
|
file = eina_module_file_get(m);
|
||||||
if (!eina_module_load(m))
|
if (!eina_module_load(m))
|
||||||
{
|
{
|
||||||
ERR("could not load module \"%s\": %s\n",
|
ERR("could not load module \"%s\": %s",
|
||||||
file, eina_error_msg_get(eina_error_get()));
|
file, eina_error_msg_get(eina_error_get()));
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
}
|
}
|
||||||
|
@ -86,7 +86,7 @@ _ethumb_plugin_list_cb(Eina_Module *m, void *data __UNUSED__)
|
||||||
plugin_get = eina_module_symbol_get(m, "ethumb_plugin_get");
|
plugin_get = eina_module_symbol_get(m, "ethumb_plugin_get");
|
||||||
if (!plugin_get)
|
if (!plugin_get)
|
||||||
{
|
{
|
||||||
ERR("could not find ethumb_plugin_get() in module \"%s\": %s\n",
|
ERR("could not find ethumb_plugin_get() in module \"%s\": %s",
|
||||||
file, eina_error_msg_get(eina_error_get()));
|
file, eina_error_msg_get(eina_error_get()));
|
||||||
eina_module_unload(m);
|
eina_module_unload(m);
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
|
@ -95,15 +95,15 @@ _ethumb_plugin_list_cb(Eina_Module *m, void *data __UNUSED__)
|
||||||
plugin = plugin_get();
|
plugin = plugin_get();
|
||||||
if (!plugin)
|
if (!plugin)
|
||||||
{
|
{
|
||||||
ERR("plugin \"%s\" failed to init.\n", file);
|
ERR("plugin \"%s\" failed to init.", file);
|
||||||
eina_module_unload(m);
|
eina_module_unload(m);
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
DBG("loaded plugin \"%s\" (%p) with extensions:\n", file, plugin);
|
DBG("loaded plugin \"%s\" (%p) with extensions:", file, plugin);
|
||||||
for (ext = plugin->extensions; *ext; ext++)
|
for (ext = plugin->extensions; *ext; ext++)
|
||||||
{
|
{
|
||||||
DBG(" extension \"%s\"\n", *ext);
|
DBG(" extension \"%s\"", *ext);
|
||||||
eina_hash_add(_plugins_ext, *ext, plugin);
|
eina_hash_add(_plugins_ext, *ext, plugin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -219,7 +219,7 @@ ethumb_new(void)
|
||||||
e = ecore_evas_get(ee);
|
e = ecore_evas_get(ee);
|
||||||
if (!e)
|
if (!e)
|
||||||
{
|
{
|
||||||
ERR("could not create ecore evas buffer\n");
|
ERR("could not create ecore evas buffer");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -229,7 +229,7 @@ ethumb_new(void)
|
||||||
o = ecore_evas_object_image_new(ee);
|
o = ecore_evas_object_image_new(ee);
|
||||||
if (!o)
|
if (!o)
|
||||||
{
|
{
|
||||||
ERR("could not create sub ecore evas buffer\n");
|
ERR("could not create sub ecore evas buffer");
|
||||||
ecore_evas_free(ee);
|
ecore_evas_free(ee);
|
||||||
free(ethumb);
|
free(ethumb);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -244,7 +244,7 @@ ethumb_new(void)
|
||||||
img = evas_object_image_add(sub_e);
|
img = evas_object_image_add(sub_e);
|
||||||
if (!img)
|
if (!img)
|
||||||
{
|
{
|
||||||
ERR("could not create source objects.\n");
|
ERR("could not create source objects.");
|
||||||
ecore_evas_free(ee);
|
ecore_evas_free(ee);
|
||||||
free(ethumb);
|
free(ethumb);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -257,7 +257,7 @@ ethumb_new(void)
|
||||||
ethumb->o = o;
|
ethumb->o = o;
|
||||||
ethumb->img = img;
|
ethumb->img = img;
|
||||||
|
|
||||||
DBG("ethumb=%p\n", ethumb);
|
DBG("ethumb=%p", ethumb);
|
||||||
|
|
||||||
return ethumb;
|
return ethumb;
|
||||||
}
|
}
|
||||||
|
@ -473,14 +473,14 @@ ethumb_frame_set(Ethumb *e, const char *theme_file, const char *group, const cha
|
||||||
frame = calloc(1, sizeof(Ethumb_Frame));
|
frame = calloc(1, sizeof(Ethumb_Frame));
|
||||||
if (!frame)
|
if (!frame)
|
||||||
{
|
{
|
||||||
ERR("could not allocate Ethumb_Frame structure.\n");
|
ERR("could not allocate Ethumb_Frame structure.");
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
frame->edje = edje_object_add(e->sub_e);
|
frame->edje = edje_object_add(e->sub_e);
|
||||||
if (!frame->edje)
|
if (!frame->edje)
|
||||||
{
|
{
|
||||||
ERR("could not create edje frame object.\n");
|
ERR("could not create edje frame object.");
|
||||||
_ethumb_frame_free(frame);
|
_ethumb_frame_free(frame);
|
||||||
e->frame = NULL;
|
e->frame = NULL;
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
|
@ -489,7 +489,7 @@ ethumb_frame_set(Ethumb *e, const char *theme_file, const char *group, const cha
|
||||||
|
|
||||||
if (!edje_object_file_set(frame->edje, theme_file, group))
|
if (!edje_object_file_set(frame->edje, theme_file, group))
|
||||||
{
|
{
|
||||||
ERR("could not load frame theme.\n");
|
ERR("could not load frame theme.");
|
||||||
_ethumb_frame_free(frame);
|
_ethumb_frame_free(frame);
|
||||||
e->frame = NULL;
|
e->frame = NULL;
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
|
@ -498,7 +498,7 @@ ethumb_frame_set(Ethumb *e, const char *theme_file, const char *group, const cha
|
||||||
edje_object_part_swallow(frame->edje, swallow, e->img);
|
edje_object_part_swallow(frame->edje, swallow, e->img);
|
||||||
if (!edje_object_part_swallow_get(frame->edje, swallow))
|
if (!edje_object_part_swallow_get(frame->edje, swallow))
|
||||||
{
|
{
|
||||||
ERR("could not swallow image to edje frame.\n");
|
ERR("could not swallow image to edje frame.");
|
||||||
_ethumb_frame_free(frame);
|
_ethumb_frame_free(frame);
|
||||||
e->frame = NULL;
|
e->frame = NULL;
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
|
@ -722,7 +722,7 @@ ethumb_file_set(Ethumb *e, const char *path, const char *key)
|
||||||
DBG("ethumb=%p, path=%s, key=%s", e, path ? path : "", key ? key : "");
|
DBG("ethumb=%p, path=%s, key=%s", e, path ? path : "", key ? key : "");
|
||||||
if (path && access(path, R_OK))
|
if (path && access(path, R_OK))
|
||||||
{
|
{
|
||||||
ERR("couldn't access file \"%s\"\n", path);
|
ERR("couldn't access file \"%s\"", path);
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -807,7 +807,7 @@ _ethumb_generate_hash(const char *file)
|
||||||
}
|
}
|
||||||
md5out[2 * n] = '\0';
|
md5out[2 * n] = '\0';
|
||||||
|
|
||||||
DBG("md5=%s, file=%s\n", md5out, file);
|
DBG("md5=%s, file=%s", md5out, file);
|
||||||
return eina_stringshare_add(md5out);
|
return eina_stringshare_add(md5out);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1046,14 +1046,14 @@ _ethumb_plugin_generate(Ethumb *e)
|
||||||
ext = strrchr(e->src_path, '.');
|
ext = strrchr(e->src_path, '.');
|
||||||
if (!ext)
|
if (!ext)
|
||||||
{
|
{
|
||||||
ERR("could not get extension for file \"%s\"\n", e->src_path);
|
ERR("could not get extension for file \"%s\"", e->src_path);
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
plugin = eina_hash_find(_plugins_ext, ext + 1);
|
plugin = eina_hash_find(_plugins_ext, ext + 1);
|
||||||
if (!plugin)
|
if (!plugin)
|
||||||
{
|
{
|
||||||
DBG("no plugin for extension: \"%s\"\n", ext + 1);
|
DBG("no plugin for extension: \"%s\"", ext + 1);
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1112,7 +1112,7 @@ ethumb_image_save(Ethumb *e)
|
||||||
|
|
||||||
if (!e->thumb_path)
|
if (!e->thumb_path)
|
||||||
{
|
{
|
||||||
ERR("could not create file path...\n");
|
ERR("could not create file path...");
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1121,7 +1121,7 @@ ethumb_image_save(Ethumb *e)
|
||||||
free(dname);
|
free(dname);
|
||||||
if (!r)
|
if (!r)
|
||||||
{
|
{
|
||||||
ERR("could not create directory '%s'\n", dname);
|
ERR("could not create directory '%s'", dname);
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1131,7 +1131,7 @@ ethumb_image_save(Ethumb *e)
|
||||||
|
|
||||||
if (!r)
|
if (!r)
|
||||||
{
|
{
|
||||||
ERR("could not save image.\n");
|
ERR("could not save image.");
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1163,7 +1163,7 @@ _ethumb_image_load(Ethumb *e)
|
||||||
error = evas_object_image_load_error_get(img);
|
error = evas_object_image_load_error_get(img);
|
||||||
if (error != EVAS_LOAD_ERROR_NONE)
|
if (error != EVAS_LOAD_ERROR_NONE)
|
||||||
{
|
{
|
||||||
ERR("could not load image '%s': %d\n", e->src_path, error);
|
ERR("could not load image '%s': %d", e->src_path, error);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1239,7 +1239,7 @@ ethumb_generate(Ethumb *e, Ethumb_Generate_Cb finished_cb, const void *data, Ein
|
||||||
|
|
||||||
if (e->finished_idler)
|
if (e->finished_idler)
|
||||||
{
|
{
|
||||||
ERR("thumbnail generation already in progress.\n");
|
ERR("thumbnail generation already in progress.");
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
}
|
}
|
||||||
e->finished_cb = finished_cb;
|
e->finished_cb = finished_cb;
|
||||||
|
@ -1248,7 +1248,7 @@ ethumb_generate(Ethumb *e, Ethumb_Generate_Cb finished_cb, const void *data, Ein
|
||||||
|
|
||||||
if (!e->src_path)
|
if (!e->src_path)
|
||||||
{
|
{
|
||||||
ERR("no file set.\n");
|
ERR("no file set.");
|
||||||
ethumb_finished_callback_call(e, 0);
|
ethumb_finished_callback_call(e, 0);
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
@ -1259,7 +1259,7 @@ ethumb_generate(Ethumb *e, Ethumb_Generate_Cb finished_cb, const void *data, Ein
|
||||||
|
|
||||||
if (!_ethumb_image_load(e))
|
if (!_ethumb_image_load(e))
|
||||||
{
|
{
|
||||||
ERR("could not load input image.\n");
|
ERR("could not load input image.");
|
||||||
ethumb_finished_callback_call(e, 0);
|
ethumb_finished_callback_call(e, 0);
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
@ -1293,7 +1293,7 @@ ethumb_exists(Ethumb *e)
|
||||||
EINA_SAFETY_ON_TRUE_RETURN_VAL(r_src, 0);
|
EINA_SAFETY_ON_TRUE_RETURN_VAL(r_src, 0);
|
||||||
|
|
||||||
if (r_thumb && errno != ENOENT)
|
if (r_thumb && errno != ENOENT)
|
||||||
ERR("could not access file \"%s\": %s\n", e->thumb_path, strerror(errno));
|
ERR("could not access file \"%s\": %s", e->thumb_path, strerror(errno));
|
||||||
else if (!r_thumb && thumb.st_mtime > src.st_mtime)
|
else if (!r_thumb && thumb.st_mtime > src.st_mtime)
|
||||||
r = EINA_TRUE;
|
r = EINA_TRUE;
|
||||||
|
|
||||||
|
|
|
@ -91,6 +91,7 @@ static int _log_dom = -1;
|
||||||
#define INF(...) EINA_LOG_DOM_INFO(_log_dom, __VA_ARGS__)
|
#define INF(...) EINA_LOG_DOM_INFO(_log_dom, __VA_ARGS__)
|
||||||
#define WRN(...) EINA_LOG_DOM_WARN(_log_dom, __VA_ARGS__)
|
#define WRN(...) EINA_LOG_DOM_WARN(_log_dom, __VA_ARGS__)
|
||||||
#define ERR(...) EINA_LOG_DOM_ERR(_log_dom, __VA_ARGS__)
|
#define ERR(...) EINA_LOG_DOM_ERR(_log_dom, __VA_ARGS__)
|
||||||
|
#define CRITICAL(...) EINA_LOG_DOM_CRIT(_log_dom, __VA_ARGS__)
|
||||||
|
|
||||||
struct _Ethumb_Client
|
struct _Ethumb_Client
|
||||||
{
|
{
|
||||||
|
@ -180,12 +181,12 @@ __dbus_callback_check_and_init(const char *file, int line, const char *function,
|
||||||
{
|
{
|
||||||
if (!msg)
|
if (!msg)
|
||||||
{
|
{
|
||||||
ERR("%s:%d:%s() callback without message arguments!\n",
|
ERR("%s:%d:%s() callback without message arguments!",
|
||||||
file, line, function);
|
file, line, function);
|
||||||
|
|
||||||
if (err)
|
if (err)
|
||||||
ERR("%s:%d:%s() an error was reported by server: "
|
ERR("%s:%d:%s() an error was reported by server: "
|
||||||
"name=\"%s\", message=\"%s\"\n",
|
"name=\"%s\", message=\"%s\"",
|
||||||
file, line, function, err->name, err->message);
|
file, line, function, err->name, err->message);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -193,7 +194,7 @@ __dbus_callback_check_and_init(const char *file, int line, const char *function,
|
||||||
|
|
||||||
if (!dbus_message_iter_init(msg, itr))
|
if (!dbus_message_iter_init(msg, itr))
|
||||||
{
|
{
|
||||||
ERR("%s:%d:%s() could not init iterator.\n",
|
ERR("%s:%d:%s() could not init iterator.",
|
||||||
file, line, function);
|
file, line, function);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -211,7 +212,7 @@ __dbus_iter_type_check(int type, int expected, const char *expected_name)
|
||||||
if (type == expected)
|
if (type == expected)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
ERR("expected type %s (%c) but got %c instead!\n",
|
ERR("expected type %s (%c) but got %c instead!",
|
||||||
expected_name, expected, type);
|
expected_name, expected, type);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -223,7 +224,7 @@ __dbus_iter_type_check(int type, int expected, const char *expected_name)
|
||||||
{ \
|
{ \
|
||||||
if ((ptr) == NULL) \
|
if ((ptr) == NULL) \
|
||||||
{ \
|
{ \
|
||||||
ERR("%s == NULL!\n", #ptr); \
|
CRITICAL("%s == NULL!", #ptr); \
|
||||||
return __VA_ARGS__; \
|
return __VA_ARGS__; \
|
||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
|
@ -243,7 +244,7 @@ _ethumb_client_name_owner_changed(void *data, DBusMessage *msg)
|
||||||
DBUS_TYPE_STRING, &to,
|
DBUS_TYPE_STRING, &to,
|
||||||
DBUS_TYPE_INVALID))
|
DBUS_TYPE_INVALID))
|
||||||
{
|
{
|
||||||
ERR("could not get NameOwnerChanged arguments: %s: %s\n",
|
ERR("could not get NameOwnerChanged arguments: %s: %s",
|
||||||
err.name, err.message);
|
err.name, err.message);
|
||||||
dbus_error_free(&err);
|
dbus_error_free(&err);
|
||||||
return;
|
return;
|
||||||
|
@ -252,17 +253,17 @@ _ethumb_client_name_owner_changed(void *data, DBusMessage *msg)
|
||||||
if (strcmp(name, _ethumb_dbus_bus_name) != 0)
|
if (strcmp(name, _ethumb_dbus_bus_name) != 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
DBG("NameOwnerChanged from=[%s] to=[%s]\n", from, to);
|
DBG("NameOwnerChanged from=[%s] to=[%s]", from, to);
|
||||||
|
|
||||||
if (from[0] != '\0' && to[0] == '\0')
|
if (from[0] != '\0' && to[0] == '\0')
|
||||||
{
|
{
|
||||||
DBG("exit ethumbd at %s\n", from);
|
DBG("exit ethumbd at %s", from);
|
||||||
if (strcmp(client->unique_name, from) != 0)
|
if (strcmp(client->unique_name, from) != 0)
|
||||||
WRN("%s was not the known name %s, ignored.\n",
|
WRN("%s was not the known name %s, ignored.",
|
||||||
from, client->unique_name);
|
from, client->unique_name);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ERR("server exit!!!\n");
|
ERR("server exit!!!");
|
||||||
if (client->die.cb)
|
if (client->die.cb)
|
||||||
{
|
{
|
||||||
client->die.cb(client->die.data, client);
|
client->die.cb(client->die.data, client);
|
||||||
|
@ -277,7 +278,7 @@ _ethumb_client_name_owner_changed(void *data, DBusMessage *msg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
DBG("unknown change from %s to %s\n", from, to);
|
DBG("unknown change from %s to %s", from, to);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -366,18 +367,18 @@ _ethumb_client_start_server_cb(void *data, DBusMessage *msg, DBusError *err)
|
||||||
dbus_message_iter_get_basic(&iter, &ret);
|
dbus_message_iter_get_basic(&iter, &ret);
|
||||||
if ((ret != 1) && (ret != 2))
|
if ((ret != 1) && (ret != 2))
|
||||||
{
|
{
|
||||||
ERR("Error starting Ethumbd DBus service by its name: retcode %u\n",
|
ERR("Error starting Ethumbd DBus service by its name: retcode %u",
|
||||||
ret);
|
ret);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
client->server_started = 1;
|
client->server_started = 1;
|
||||||
DBG("Ethumbd DBus service started successfully (%d), now request its name\n",
|
DBG("Ethumbd DBus service started successfully (%d), now request its name",
|
||||||
ret);
|
ret);
|
||||||
|
|
||||||
if (client->pending_get_name_owner)
|
if (client->pending_get_name_owner)
|
||||||
{
|
{
|
||||||
DBG("already requesting name owner, cancel and try again\n");
|
DBG("already requesting name owner, cancel and try again");
|
||||||
dbus_pending_call_cancel(client->pending_get_name_owner);
|
dbus_pending_call_cancel(client->pending_get_name_owner);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -386,14 +387,14 @@ _ethumb_client_start_server_cb(void *data, DBusMessage *msg, DBusError *err)
|
||||||
client);
|
client);
|
||||||
if (!client->pending_get_name_owner)
|
if (!client->pending_get_name_owner)
|
||||||
{
|
{
|
||||||
ERR("could not create a get_name_owner request.\n");
|
ERR("could not create a get_name_owner request.");
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
ERR("failed to start Ethumbd DBus service by its name.\n");
|
ERR("failed to start Ethumbd DBus service by its name.");
|
||||||
_ethumb_client_report_connect(client, 0);
|
_ethumb_client_report_connect(client, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -402,7 +403,7 @@ _ethumb_client_start_server(Ethumb_Client *client)
|
||||||
{
|
{
|
||||||
if (client->pending_start_service_by_name)
|
if (client->pending_start_service_by_name)
|
||||||
{
|
{
|
||||||
DBG("already pending start service by name.\n");
|
DBG("already pending start service by name.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -412,7 +413,7 @@ _ethumb_client_start_server(Ethumb_Client *client)
|
||||||
client);
|
client);
|
||||||
if (!client->pending_start_service_by_name)
|
if (!client->pending_start_service_by_name)
|
||||||
{
|
{
|
||||||
ERR("could not start service by name!\n");
|
ERR("could not start service by name!");
|
||||||
_ethumb_client_report_connect(client, 0);
|
_ethumb_client_report_connect(client, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -429,7 +430,7 @@ _ethumb_client_get_name_owner(void *data, DBusMessage *msg, DBusError *err)
|
||||||
|
|
||||||
if (dbus_error_is_set(err) && (!client->server_started))
|
if (dbus_error_is_set(err) && (!client->server_started))
|
||||||
{
|
{
|
||||||
DBG("could not find server (%s), try to start it...\n", err->message);
|
DBG("could not find server (%s), try to start it...", err->message);
|
||||||
_ethumb_client_start_server(client);
|
_ethumb_client_start_server(client);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -444,11 +445,11 @@ _ethumb_client_get_name_owner(void *data, DBusMessage *msg, DBusError *err)
|
||||||
dbus_message_iter_get_basic(&iter, &uid);
|
dbus_message_iter_get_basic(&iter, &uid);
|
||||||
if (!uid)
|
if (!uid)
|
||||||
{
|
{
|
||||||
ERR("no name owner!\n");
|
ERR("no name owner!");
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
DBG("unique name = %s\n", uid);
|
DBG("unique name = %s", uid);
|
||||||
client->unique_name = eina_stringshare_add(uid);
|
client->unique_name = eina_stringshare_add(uid);
|
||||||
|
|
||||||
_ethumb_client_call_new(client);
|
_ethumb_client_call_new(client);
|
||||||
|
@ -584,7 +585,7 @@ ethumb_client_connect(Ethumb_Client_Connect_Cb connect_cb, const void *data, Ein
|
||||||
eclient = calloc(1, sizeof(*eclient));
|
eclient = calloc(1, sizeof(*eclient));
|
||||||
if (!eclient)
|
if (!eclient)
|
||||||
{
|
{
|
||||||
ERR("could not allocate Ethumb_Client structure.\n");
|
ERR("could not allocate Ethumb_Client structure.");
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -595,14 +596,14 @@ ethumb_client_connect(Ethumb_Client_Connect_Cb connect_cb, const void *data, Ein
|
||||||
eclient->ethumb = ethumb_new();
|
eclient->ethumb = ethumb_new();
|
||||||
if (!eclient->ethumb)
|
if (!eclient->ethumb)
|
||||||
{
|
{
|
||||||
ERR("could not create ethumb handler.\n");
|
ERR("could not create ethumb handler.");
|
||||||
goto ethumb_new_err;
|
goto ethumb_new_err;
|
||||||
}
|
}
|
||||||
|
|
||||||
eclient->conn = e_dbus_bus_get(DBUS_BUS_SESSION);
|
eclient->conn = e_dbus_bus_get(DBUS_BUS_SESSION);
|
||||||
if (!eclient->conn)
|
if (!eclient->conn)
|
||||||
{
|
{
|
||||||
ERR("could not connect to session bus.\n");
|
ERR("could not connect to session bus.");
|
||||||
goto connection_err;
|
goto connection_err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -615,7 +616,7 @@ ethumb_client_connect(Ethumb_Client_Connect_Cb connect_cb, const void *data, Ein
|
||||||
eclient);
|
eclient);
|
||||||
if (!eclient->pending_get_name_owner)
|
if (!eclient->pending_get_name_owner)
|
||||||
{
|
{
|
||||||
ERR("could not create a get_name_owner request.\n");
|
ERR("could not create a get_name_owner request.");
|
||||||
goto connection_err;
|
goto connection_err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -793,7 +794,7 @@ _ethumb_client_dbus_get_bytearray(DBusMessageIter *iter)
|
||||||
el_type = dbus_message_iter_get_element_type(iter);
|
el_type = dbus_message_iter_get_element_type(iter);
|
||||||
if (el_type != DBUS_TYPE_BYTE)
|
if (el_type != DBUS_TYPE_BYTE)
|
||||||
{
|
{
|
||||||
ERR("not an byte array element.\n");
|
ERR("not an byte array element.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2050,7 +2051,7 @@ ethumb_client_generate(Ethumb_Client *client, Ethumb_Client_Generate_Cb generate
|
||||||
ethumb_file_get(client->ethumb, &file, &key);
|
ethumb_file_get(client->ethumb, &file, &key);
|
||||||
if (!file)
|
if (!file)
|
||||||
{
|
{
|
||||||
ERR("no file set.\n");
|
ERR("no file set.");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue