marrakesh now can use MRKHOST and MRKPORT and default is set up

This commit is contained in:
Carsten Haitzler 2014-09-25 13:41:10 +09:00
parent 7ef6b73bb1
commit 4410964129
1 changed files with 8 additions and 2 deletions

10
mrk.c
View File

@ -103,6 +103,8 @@ static const char *sane_name_veto[] = {"../", "./", "/", NULL};
static const char *sane_name_ok = "01234567890-_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ. ";
static const char *sane_path_veto[] = {"../", "./", NULL};
static const char *sane_path_ok = "01234567890-_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ. ";
static char *server = "devs.enlightenment.org";
static int server_port = 10077;
static void
err(char *msg)
@ -1103,7 +1105,7 @@ _ipc_cb_dat(void *data, int type, void *event)
static int
package_up(const char *file)
{
ipc = ecore_ipc_server_connect(ECORE_IPC_REMOTE_SYSTEM, "localhost", 10077, NULL);
ipc = ecore_ipc_server_connect(ECORE_IPC_REMOTE_SYSTEM, server, server_port, NULL);
if (!ipc) return 0;
ecore_event_handler_add(ECORE_IPC_EVENT_SERVER_ADD, _ipc_cb_add, NULL);
ecore_event_handler_add(ECORE_IPC_EVENT_SERVER_DEL, _ipc_cb_del, NULL);
@ -1198,7 +1200,7 @@ _ipc2_cb_dat(void *data, int type, void *event)
static int
package_down(const char *name)
{
ipc = ecore_ipc_server_connect(ECORE_IPC_REMOTE_SYSTEM, "localhost", 10077, NULL);
ipc = ecore_ipc_server_connect(ECORE_IPC_REMOTE_SYSTEM, server, server_port, NULL);
if (!ipc) return 0;
ecore_event_handler_add(ECORE_IPC_EVENT_SERVER_ADD, _ipc2_cb_add, NULL);
ecore_event_handler_add(ECORE_IPC_EVENT_SERVER_DEL, _ipc2_cb_del, NULL);
@ -1239,6 +1241,10 @@ main(int argc, char **argv)
s = getenv("DESTDIR");
if (s) tmpd = s;
if (getenv("MRKHOST")) server = getenv("MRKHOST");
if (getenv("MRKPORT")) server_port = atoi(getenv("MRKPORT"));
if (!strcmp(argv[1], "build"))
{
if (!parse_bld("Marrakesh.mrk")) return 1;