summaryrefslogtreecommitdiff
path: root/src/lib/ecore_ipc
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@profusion.mobi>2016-11-23 17:09:18 -0200
committerGustavo Sverzut Barbieri <barbieri@profusion.mobi>2016-11-23 17:09:18 -0200
commit3131a966c9eb8b7e4137782d10446ccac8ae7d9a (patch)
tree1a4e746efbf2ad214054c895744792202bc9086e /src/lib/ecore_ipc
parent4b771d3e1b3fd17ebab6c410b38ef451248a422a (diff)
ecore_ipc: rename 'server' to 'legacy_server'.
Since the plan is to introduce a server based on efl_net_server, first rename the existing handle with 'legacy_' prefix.
Diffstat (limited to 'src/lib/ecore_ipc')
-rw-r--r--src/lib/ecore_ipc/ecore_ipc.c40
-rw-r--r--src/lib/ecore_ipc/ecore_ipc_private.h2
2 files changed, 21 insertions, 21 deletions
diff --git a/src/lib/ecore_ipc/ecore_ipc.c b/src/lib/ecore_ipc/ecore_ipc.c
index c0f9f5f5ac..0d073b211f 100644
--- a/src/lib/ecore_ipc/ecore_ipc.c
+++ b/src/lib/ecore_ipc/ecore_ipc.c
@@ -380,19 +380,19 @@ ecore_ipc_server_add(Ecore_Ipc_Type compl_type, const char *name, int port, cons
380 switch (type) 380 switch (type)
381 { 381 {
382 case ECORE_IPC_LOCAL_USER: 382 case ECORE_IPC_LOCAL_USER:
383 svr->server = ecore_con_server_add(ECORE_CON_LOCAL_USER | extra, name, port, svr); 383 svr->legacy_server = ecore_con_server_add(ECORE_CON_LOCAL_USER | extra, name, port, svr);
384 break; 384 break;
385 case ECORE_IPC_LOCAL_SYSTEM: 385 case ECORE_IPC_LOCAL_SYSTEM:
386 svr->server = ecore_con_server_add(ECORE_CON_LOCAL_SYSTEM | extra, name, port, svr); 386 svr->legacy_server = ecore_con_server_add(ECORE_CON_LOCAL_SYSTEM | extra, name, port, svr);
387 break; 387 break;
388 case ECORE_IPC_REMOTE_SYSTEM: 388 case ECORE_IPC_REMOTE_SYSTEM:
389 svr->server = ecore_con_server_add(ECORE_CON_REMOTE_SYSTEM | extra, name, port, svr); 389 svr->legacy_server = ecore_con_server_add(ECORE_CON_REMOTE_SYSTEM | extra, name, port, svr);
390 break; 390 break;
391 default: 391 default:
392 free(svr); 392 free(svr);
393 return NULL; 393 return NULL;
394 } 394 }
395 if (!svr->server) 395 if (!svr->legacy_server)
396 { 396 {
397 free(svr); 397 free(svr);
398 return NULL; 398 return NULL;
@@ -533,19 +533,19 @@ ecore_ipc_server_connect_legacy(Ecore_Ipc_Type compl_type, char *name, int port,
533 switch (type) 533 switch (type)
534 { 534 {
535 case ECORE_IPC_LOCAL_USER: 535 case ECORE_IPC_LOCAL_USER:
536 svr->server = ecore_con_server_connect(ECORE_CON_LOCAL_USER | extra, name, port, svr); 536 svr->legacy_server = ecore_con_server_connect(ECORE_CON_LOCAL_USER | extra, name, port, svr);
537 break; 537 break;
538 case ECORE_IPC_LOCAL_SYSTEM: 538 case ECORE_IPC_LOCAL_SYSTEM:
539 svr->server = ecore_con_server_connect(ECORE_CON_LOCAL_SYSTEM | extra, name, port, svr); 539 svr->legacy_server = ecore_con_server_connect(ECORE_CON_LOCAL_SYSTEM | extra, name, port, svr);
540 break; 540 break;
541 case ECORE_IPC_REMOTE_SYSTEM: 541 case ECORE_IPC_REMOTE_SYSTEM:
542 svr->server = ecore_con_server_connect(ECORE_CON_REMOTE_SYSTEM | extra, name, port, svr); 542 svr->legacy_server = ecore_con_server_connect(ECORE_CON_REMOTE_SYSTEM | extra, name, port, svr);
543 break; 543 break;
544 default: 544 default:
545 free(svr); 545 free(svr);
546 return NULL; 546 return NULL;
547 } 547 }
548 if (!svr->server) 548 if (!svr->legacy_server)
549 { 549 {
550 free(svr); 550 free(svr);
551 return NULL; 551 return NULL;
@@ -711,7 +711,7 @@ ecore_ipc_server_del(Ecore_Ipc_Server *svr)
711 } 711 }
712 712
713 if (svr->dialer.dialer) _ecore_ipc_dialer_del(svr); 713 if (svr->dialer.dialer) _ecore_ipc_dialer_del(svr);
714 if (svr->server) ecore_con_server_del(svr->server); 714 if (svr->legacy_server) ecore_con_server_del(svr->legacy_server);
715 servers = eina_list_remove(servers, svr); 715 servers = eina_list_remove(servers, svr);
716 716
717 if (svr->buf) free(svr->buf); 717 if (svr->buf) free(svr->buf);
@@ -747,9 +747,9 @@ ecore_ipc_server_connected_get(Ecore_Ipc_Server *svr)
747 747
748 if (svr->dialer.dialer) 748 if (svr->dialer.dialer)
749 return efl_net_dialer_connected_get(svr->dialer.dialer); 749 return efl_net_dialer_connected_get(svr->dialer.dialer);
750 else if (!svr->server) return EINA_FALSE; 750 else if (!svr->legacy_server) return EINA_FALSE;
751 751
752 return ecore_con_server_connected_get(svr->server); 752 return ecore_con_server_connected_get(svr->legacy_server);
753} 753}
754 754
755EAPI Eina_List * 755EAPI Eina_List *
@@ -874,10 +874,10 @@ ecore_ipc_server_send(Ecore_Ipc_Server *svr, int major, int minor, int ref, int
874 874
875 return s + size; 875 return s + size;
876 } 876 }
877 else if (!svr->server) return 0; 877 else if (!svr->legacy_server) return 0;
878 878
879 ret = ecore_con_server_send(svr->server, dat, s); 879 ret = ecore_con_server_send(svr->legacy_server, dat, s);
880 if (size > 0) ret += ecore_con_server_send(svr->server, data, size); 880 if (size > 0) ret += ecore_con_server_send(svr->legacy_server, data, size);
881 return ret; 881 return ret;
882} 882}
883 883
@@ -890,7 +890,7 @@ ecore_ipc_server_client_limit_set(Ecore_Ipc_Server *svr, int client_limit, char
890 "ecore_ipc_server_client_limit_set"); 890 "ecore_ipc_server_client_limit_set");
891 return; 891 return;
892 } 892 }
893 ecore_con_server_client_limit_set(svr->server, client_limit, reject_excess_clients); 893 ecore_con_server_client_limit_set(svr->legacy_server, client_limit, reject_excess_clients);
894} 894}
895 895
896EAPI void 896EAPI void
@@ -935,9 +935,9 @@ ecore_ipc_server_ip_get(Ecore_Ipc_Server *svr)
935 /* original IPC just returned IP for remote connections */ 935 /* original IPC just returned IP for remote connections */
936 return NULL; 936 return NULL;
937 } 937 }
938 else if (!svr->server) return NULL; 938 else if (!svr->legacy_server) return NULL;
939 939
940 return ecore_con_server_ip_get(svr->server); 940 return ecore_con_server_ip_get(svr->legacy_server);
941} 941}
942 942
943EAPI void 943EAPI void
@@ -955,9 +955,9 @@ ecore_ipc_server_flush(Ecore_Ipc_Server *svr)
955 efl_io_copier_flush(svr->dialer.send_copier); 955 efl_io_copier_flush(svr->dialer.send_copier);
956 return; 956 return;
957 } 957 }
958 else if (!svr->server) return; 958 else if (!svr->legacy_server) return;
959 959
960 ecore_con_server_flush(svr->server); 960 ecore_con_server_flush(svr->legacy_server);
961} 961}
962 962
963#define CLENC(_member) \ 963#define CLENC(_member) \
@@ -1233,7 +1233,7 @@ _ecore_ipc_event_server_del(void *data EINA_UNUSED, int ev_type EINA_UNUSED, voi
1233 Ecore_Ipc_Server *svr; 1233 Ecore_Ipc_Server *svr;
1234 1234
1235 svr = ecore_con_server_data_get(e->server); 1235 svr = ecore_con_server_data_get(e->server);
1236 svr->server = NULL; 1236 svr->legacy_server = NULL;
1237 1237
1238 ecore_ipc_post_event_server_del(svr); 1238 ecore_ipc_post_event_server_del(svr);
1239 } 1239 }
diff --git a/src/lib/ecore_ipc/ecore_ipc_private.h b/src/lib/ecore_ipc/ecore_ipc_private.h
index 4770da4587..9f0def1f44 100644
--- a/src/lib/ecore_ipc/ecore_ipc_private.h
+++ b/src/lib/ecore_ipc/ecore_ipc_private.h
@@ -93,7 +93,7 @@ struct _Ecore_Ipc_Server
93 Eo *send_copier; 93 Eo *send_copier;
94 } dialer; 94 } dialer;
95 95
96 Ecore_Con_Server *server; 96 Ecore_Con_Server *legacy_server;
97 Eina_List *clients; 97 Eina_List *clients;
98 void *data; 98 void *data;
99 unsigned char *buf; 99 unsigned char *buf;