summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-07-24 23:22:47 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-07-24 23:22:47 +0100
commit29a72e9c6cb917b6f750278ba49471c6435a32d2 (patch)
treec7fa5a85dedfe6a69e87cb4bf3efa9a43eb09ac6
parentb01b2190179d5ee7db22047a7b4adfb1db07cac6 (diff)
efreetd - add more logging for what efreetd says to clients
-rw-r--r--src/bin/efreet/efreetd_ipc.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/bin/efreet/efreetd_ipc.c b/src/bin/efreet/efreetd_ipc.c
index 0992345d3f..129f886f34 100644
--- a/src/bin/efreet/efreetd_ipc.c
+++ b/src/bin/efreet/efreetd_ipc.c
@@ -12,6 +12,8 @@
12#include "efreetd.h" 12#include "efreetd.h"
13#include "efreetd_cache.h" 13#include "efreetd_cache.h"
14 14
15extern FILE *efreetd_log_file;
16
15static int init = 0; 17static int init = 0;
16static Ecore_Ipc_Server *ipc = NULL; 18static Ecore_Ipc_Server *ipc = NULL;
17static Ecore_Event_Handler *hnd_add = NULL; 19static Ecore_Event_Handler *hnd_add = NULL;
@@ -47,6 +49,8 @@ _broadcast(Ecore_Ipc_Server *svr, int major, int minor, void *data, int size)
47 49
48 EINA_LIST_FOREACH(ipc_clients, l, cl) 50 EINA_LIST_FOREACH(ipc_clients, l, cl)
49 { 51 {
52 fprintf(efreetd_log_file, "[%09.3f] Client broadcast %i.%i\n", ecore_time_get(), major, minor);
53 fflush(efreetd_log_file);
50 ecore_ipc_client_send(cl, major, minor, 0, 0, 0, data, size); 54 ecore_ipc_client_send(cl, major, minor, 0, 0, 0, data, size);
51 } 55 }
52} 56}
@@ -117,6 +121,9 @@ _cb_client_add(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
117 quit_timer_start = NULL; 121 quit_timer_start = NULL;
118 } 122 }
119 clients++; 123 clients++;
124 fprintf(efreetd_log_file, "[%09.3f] Add client (count=%i)\n", ecore_time_get(),
125 clients);
126 fflush(efreetd_log_file);
120 return ECORE_CALLBACK_DONE; 127 return ECORE_CALLBACK_DONE;
121} 128}
122 129
@@ -125,6 +132,9 @@ _cb_client_del(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
125{ 132{
126 IPC_HEAD(Del); 133 IPC_HEAD(Del);
127 clients--; 134 clients--;
135 fprintf(efreetd_log_file, "[%09.3f] Del client (count=%i)\n", ecore_time_get(),
136 clients);
137 fflush(efreetd_log_file);
128 if (clients == 0) 138 if (clients == 0)
129 { 139 {
130 if (quit_timer) ecore_timer_del(quit_timer); 140 if (quit_timer) ecore_timer_del(quit_timer);
@@ -141,6 +151,8 @@ _cb_client_data(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
141 IPC_HEAD(Data); 151 IPC_HEAD(Data);
142 if (e->major == 1) // register lang 152 if (e->major == 1) // register lang
143 { // input: str -> lang 153 { // input: str -> lang
154 fprintf(efreetd_log_file, "[%09.3f] Client register lang\n", ecore_time_get());
155 fflush(efreetd_log_file);
144 if ((s = _parse_str(e->data, e->size))) 156 if ((s = _parse_str(e->data, e->size)))
145 { 157 {
146 setenv("LANG", s, 1); 158 setenv("LANG", s, 1);
@@ -152,6 +164,8 @@ _cb_client_data(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
152 } 164 }
153 else if (e->major == 2) // add desktop dirs 165 else if (e->major == 2) // add desktop dirs
154 { // input: array of str -> dirs 166 { // input: array of str -> dirs
167 fprintf(efreetd_log_file, "[%09.3f] Client add desktop dirs\n", ecore_time_get());
168 fflush(efreetd_log_file);
155 strs = _parse_strs(e->data, e->size); 169 strs = _parse_strs(e->data, e->size);
156 EINA_LIST_FREE(strs, s) 170 EINA_LIST_FREE(strs, s)
157 { 171 {
@@ -161,6 +175,8 @@ _cb_client_data(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
161 } 175 }
162 else if (e->major == 3) // build desktop cache 176 else if (e->major == 3) // build desktop cache
163 { // input: str -> lang 177 { // input: str -> lang
178 fprintf(efreetd_log_file, "[%09.3f] Client update desktop cache\n", ecore_time_get());
179 fflush(efreetd_log_file);
164 if ((s = _parse_str(e->data, e->size))) 180 if ((s = _parse_str(e->data, e->size)))
165 { 181 {
166 setenv("LANG", s, 1); 182 setenv("LANG", s, 1);
@@ -170,6 +186,8 @@ _cb_client_data(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
170 } 186 }
171 else if (e->major == 4) // add icon dirs 187 else if (e->major == 4) // add icon dirs
172 { // input: array of str -> dirs 188 { // input: array of str -> dirs
189 fprintf(efreetd_log_file, "[%09.3f] Client add icon dirs\n", ecore_time_get());
190 fflush(efreetd_log_file);
173 strs = _parse_strs(e->data, e->size); 191 strs = _parse_strs(e->data, e->size);
174 EINA_LIST_FREE(strs, s) 192 EINA_LIST_FREE(strs, s)
175 { 193 {
@@ -179,6 +197,8 @@ _cb_client_data(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
179 } 197 }
180 else if (e->major == 5) // add icon exts 198 else if (e->major == 5) // add icon exts
181 { // input: array of str -> exts 199 { // input: array of str -> exts
200 fprintf(efreetd_log_file, "[%09.3f] Client add icon exts\n", ecore_time_get());
201 fflush(efreetd_log_file);
182 strs = _parse_strs(e->data, e->size); 202 strs = _parse_strs(e->data, e->size);
183 EINA_LIST_FREE(strs, s) 203 EINA_LIST_FREE(strs, s)
184 { 204 {