efreet: use correct path when generating error message about stale efreetd socket

Summary:
using runtime directory in all cases for this is wrong, as ecore-con has a number
of fallback codepaths for the case where runtime directory is not set or not valid.

by using the same ecore-con function which ecore-ipc uses to generate the socket
string, the error message path should always be the same as the path which is
used by efreetd

extra linkage was required by efreet in order to use ecore-con functions, so
the internal lib variable in the build system was modified to provide this

@fix

fix T7045

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T7045

Differential Revision: https://phab.enlightenment.org/D6425
This commit is contained in:
Mike Blumenkrantz 2018-07-03 12:49:08 -04:00 committed by Chris Michael
parent dca39ebec1
commit b4c2db8d05
2 changed files with 5 additions and 2 deletions

View File

@ -4791,6 +4791,7 @@ EFL_INTERNAL_DEPEND_PKG([EFREET], [eo])
EFL_INTERNAL_DEPEND_PKG([EFREET], [efl])
EFL_INTERNAL_DEPEND_PKG([EFREET], [eina])
EFL_INTERNAL_DEPEND_PKG([EFREET], [emile])
EFL_INTERNAL_DEPEND_PKG([EFREET], [ecore-con])
EFL_INTERNAL_DEPEND_PKG([EFREET], [ecore-ipc])
### Checks for header files

View File

@ -16,6 +16,7 @@
#include <Ecore.h>
#include <Ecore_File.h>
#include <Ecore_Ipc.h>
#include <Ecore_Con.h>
/* define macros and variable for using the eina logging system */
#define EFREET_MODULE_LOG_DOM _efreet_cache_log_dom
@ -168,9 +169,10 @@ _cb_server_del(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
if (disable_cache) return ECORE_CALLBACK_RENEW;
if (reconnect_count > 10)
{
char *address = ecore_con_local_path_new(EINA_FALSE, "efreetd", 0);
reconnect_timer = NULL;
ERR("efreetd connection failed 10 times! check for stale socket files in %s/.ecore/efreetd",
efreet_runtime_dir_get());
ERR("efreetd connection failed 10 times! check for stale socket file at %s", address);
free(address);
return EINA_FALSE;
}
t = ecore_time_get();