diff options
author | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2020-04-10 01:15:30 +0200 |
---|---|---|
committer | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2020-04-10 01:15:30 +0200 |
commit | 9fd9a3b120fe9bef32af1fcc0742a9f875f484d8 (patch) | |
tree | b03bdf9ef307ad5c465c52f190bf319002abedb5 /src/lib/efreet | |
parent | 6df39f0382e8a398b35c7e18ca547f1bb461bd10 (diff) |
efreetd - ensure on bsd where connects succed despite daemon being gone
just get it to work... getting unamused with this.
Diffstat (limited to 'src/lib/efreet')
-rw-r--r-- | src/lib/efreet/efreet_cache.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/lib/efreet/efreet_cache.c b/src/lib/efreet/efreet_cache.c index a34ffd405d..f859c630f0 100644 --- a/src/lib/efreet/efreet_cache.c +++ b/src/lib/efreet/efreet_cache.c | |||
@@ -101,6 +101,7 @@ static void *hash_array_string_add(void *hash, const char *key, void *data); | |||
101 | 101 | ||
102 | static Eina_Bool disable_cache; | 102 | static Eina_Bool disable_cache; |
103 | static Eina_Bool run_in_tree; | 103 | static Eina_Bool run_in_tree; |
104 | static int relaunch_try = 0; | ||
104 | 105 | ||
105 | EAPI int EFREET_EVENT_ICON_CACHE_UPDATE = 0; | 106 | EAPI int EFREET_EVENT_ICON_CACHE_UPDATE = 0; |
106 | EAPI int EFREET_EVENT_DESKTOP_CACHE_UPDATE = 0; | 107 | EAPI int EFREET_EVENT_DESKTOP_CACHE_UPDATE = 0; |
@@ -120,8 +121,16 @@ _ipc_launch(void) | |||
120 | int tries = 1000; // 1000 * 10ms == 10sec | 121 | int tries = 1000; // 1000 * 10ms == 10sec |
121 | const char *s; | 122 | const char *s; |
122 | 123 | ||
123 | ipc = ecore_ipc_server_connect(ECORE_IPC_LOCAL_USER, "efreetd", 0, NULL); | 124 | if (relaunch_try == 0) |
124 | if (ipc) return; | 125 | { |
126 | ipc = ecore_ipc_server_connect(ECORE_IPC_LOCAL_USER, "efreetd", 0, NULL); | ||
127 | if (ipc) | ||
128 | { | ||
129 | relaunch_try++; | ||
130 | return; | ||
131 | } | ||
132 | } | ||
133 | relaunch_try--; | ||
125 | s = getenv("EFREETD_CONNECT_TRIES"); | 134 | s = getenv("EFREETD_CONNECT_TRIES"); |
126 | if (s) | 135 | if (s) |
127 | { | 136 | { |
@@ -153,6 +162,7 @@ static Eina_Bool | |||
153 | _cb_server_add(void *data EINA_UNUSED, int type EINA_UNUSED, void *event) | 162 | _cb_server_add(void *data EINA_UNUSED, int type EINA_UNUSED, void *event) |
154 | { | 163 | { |
155 | IPC_HEAD(Add); | 164 | IPC_HEAD(Add); |
165 | relaunch_try--; | ||
156 | return ECORE_CALLBACK_DONE; | 166 | return ECORE_CALLBACK_DONE; |
157 | } | 167 | } |
158 | 168 | ||