summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-09-25 13:41:10 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-09-25 13:41:10 +0900
commit44109641290d0443fe114558929fd454bfcb5ffc (patch)
tree902151d16c704b3b4c88143e0864d03a4774cffb
parent7ef6b73bb1ccd34e669682cb13c83f067e89332a (diff)
marrakesh now can use MRKHOST and MRKPORT and default is set up
-rw-r--r--mrk.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/mrk.c b/mrk.c
index 42b323a..8a221af 100644
--- a/mrk.c
+++ b/mrk.c
@@ -103,6 +103,8 @@ static const char *sane_name_veto[] = {"../", "./", "/", NULL};
103static const char *sane_name_ok = "01234567890-_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ. "; 103static const char *sane_name_ok = "01234567890-_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ. ";
104static const char *sane_path_veto[] = {"../", "./", NULL}; 104static const char *sane_path_veto[] = {"../", "./", NULL};
105static const char *sane_path_ok = "01234567890-_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ. "; 105static const char *sane_path_ok = "01234567890-_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ. ";
106static char *server = "devs.enlightenment.org";
107static int server_port = 10077;
106 108
107static void 109static void
108err(char *msg) 110err(char *msg)
@@ -1103,7 +1105,7 @@ _ipc_cb_dat(void *data, int type, void *event)
1103static int 1105static int
1104package_up(const char *file) 1106package_up(const char *file)
1105{ 1107{
1106 ipc = ecore_ipc_server_connect(ECORE_IPC_REMOTE_SYSTEM, "localhost", 10077, NULL); 1108 ipc = ecore_ipc_server_connect(ECORE_IPC_REMOTE_SYSTEM, server, server_port, NULL);
1107 if (!ipc) return 0; 1109 if (!ipc) return 0;
1108 ecore_event_handler_add(ECORE_IPC_EVENT_SERVER_ADD, _ipc_cb_add, NULL); 1110 ecore_event_handler_add(ECORE_IPC_EVENT_SERVER_ADD, _ipc_cb_add, NULL);
1109 ecore_event_handler_add(ECORE_IPC_EVENT_SERVER_DEL, _ipc_cb_del, NULL); 1111 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)
1198static int 1200static int
1199package_down(const char *name) 1201package_down(const char *name)
1200{ 1202{
1201 ipc = ecore_ipc_server_connect(ECORE_IPC_REMOTE_SYSTEM, "localhost", 10077, NULL); 1203 ipc = ecore_ipc_server_connect(ECORE_IPC_REMOTE_SYSTEM, server, server_port, NULL);
1202 if (!ipc) return 0; 1204 if (!ipc) return 0;
1203 ecore_event_handler_add(ECORE_IPC_EVENT_SERVER_ADD, _ipc2_cb_add, NULL); 1205 ecore_event_handler_add(ECORE_IPC_EVENT_SERVER_ADD, _ipc2_cb_add, NULL);
1204 ecore_event_handler_add(ECORE_IPC_EVENT_SERVER_DEL, _ipc2_cb_del, NULL); 1206 ecore_event_handler_add(ECORE_IPC_EVENT_SERVER_DEL, _ipc2_cb_del, NULL);
@@ -1239,6 +1241,10 @@ main(int argc, char **argv)
1239 1241
1240 s = getenv("DESTDIR"); 1242 s = getenv("DESTDIR");
1241 if (s) tmpd = s; 1243 if (s) tmpd = s;
1244
1245 if (getenv("MRKHOST")) server = getenv("MRKHOST");
1246 if (getenv("MRKPORT")) server_port = atoi(getenv("MRKPORT"));
1247
1242 if (!strcmp(argv[1], "build")) 1248 if (!strcmp(argv[1], "build"))
1243 { 1249 {
1244 if (!parse_bld("Marrakesh.mrk")) return 1; 1250 if (!parse_bld("Marrakesh.mrk")) return 1;