if ipc serve fails - try ipc send again.

SVN revision: 81854
devs/lucas/wip
Carsten Haitzler 10 years ago
parent ce00c0157f
commit 970051e45a
  1. 7
      src/bin/ipc.c
  2. 2
      src/bin/ipc.h
  3. 11
      src/bin/main.c

@ -117,16 +117,17 @@ ipc_init(void)
"nowm", nowm, EET_T_INT);
}
void
Eina_Bool
ipc_serve(void)
{
char *hash = _ipc_hash_get();
if (!hash) return;
if (!hash) return EINA_FALSE;
ipc = ecore_ipc_server_add(ECORE_IPC_LOCAL_USER, hash, 0, NULL);
free(hash);
if (!ipc) return;
if (!ipc) return EINA_FALSE;
hnd_data = ecore_event_handler_add
(ECORE_IPC_EVENT_CLIENT_DATA, _ipc_cb_client_data, NULL);
return EINA_TRUE;
}
void

@ -30,7 +30,7 @@ struct _Ipc_Instance
void ipc_init(void);
void ipc_shutdown(void);
void ipc_serve(void);
Eina_Bool ipc_serve(void);
void ipc_instance_new_func_set(void (*func) (Ipc_Instance *inst));
Eina_Bool ipc_instance_add(Ipc_Instance *inst);

@ -921,6 +921,7 @@ elm_main(int argc, char **argv)
{
Win *wn;
Term *term;
int remote_try = 0;
char *cmd = NULL;
char *cd = NULL;
char *theme = NULL;
@ -1209,6 +1210,7 @@ elm_main(int argc, char **argv)
if (login_shell == 0xff) login_shell = EINA_FALSE;
ipc_init();
remote:
if ((!single) && (config->multi_instance))
{
Ipc_Instance inst;
@ -1253,7 +1255,14 @@ elm_main(int argc, char **argv)
if ((!single) && (config->multi_instance))
{
ipc_instance_new_func_set(main_ipc_new);
ipc_serve();
if (!ipc_serve())
{
if (remote_try < 1)
{
remote_try++;
goto remote;
}
}
}
wn = main_win_new(name, role, title, icon_name,

Loading…
Cancel
Save