yoz pushed a commit to branch master.

http://git.enlightenment.org/misc/entrance.git/commit/?id=a005f75fc0fec90150d65f0d4cf30c742ef5a657

commit a005f75fc0fec90150d65f0d4cf30c742ef5a657
Author: Michael Bouchaud <[email protected]>
Date:   Thu Jan 16 21:50:15 2014 +0100

    entrance: entrance_init now init display name but not the cookie
---
 src/daemon/entrance.c         |  4 ++--
 src/daemon/entrance_session.c | 11 ++++++++---
 src/daemon/entrance_session.h |  1 +
 3 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/src/daemon/entrance.c b/src/daemon/entrance.c
index 5ef9e3c..7f18c38 100644
--- a/src/daemon/entrance.c
+++ b/src/daemon/entrance.c
@@ -154,11 +154,10 @@ _entrance_main(const char *dname)
              char buf[PATH_MAX];
              ecore_event_handler_add(ECORE_EXE_EVENT_DEL,
                                      _entrance_client_del, NULL);
-             PT("Exec entrance_client: ");
              snprintf(buf, sizeof(buf),
                       PACKAGE_BIN_DIR"/entrance_client -d %s -t %s",
                       dname, entrance_config->theme);
-             printf("%s\n", buf);
+             PT("Exec entrance_client: %s\n", buf);
 
              _entrance_client = ecore_exe_run(buf, NULL);
           }
@@ -342,6 +341,7 @@ main (int argc, char ** argv)
 
    PT("session init\n");
    entrance_session_init(dname);
+   entrance_session_cookie();
    if (!_xephyr)
      {
         PT("xserver init\n");
diff --git a/src/daemon/entrance_session.c b/src/daemon/entrance_session.c
index 239e707..d64c3c9 100644
--- a/src/daemon/entrance_session.c
+++ b/src/daemon/entrance_session.c
@@ -227,10 +227,16 @@ entrance_session_pid_get(void)
    return _session_pid;
 }
 
+void
+entrance_session_init(const char *dname)
+{
+   _dname = dname;
+}
+
 static const char *dig = "0123456789abcdef";
 
 void
-entrance_session_init(const char *dname)
+entrance_session_cookie(void)
 {
    uint16_t word;
    uint8_t hi, lo;
@@ -256,11 +262,10 @@ entrance_session_init(const char *dname)
             entrance_config->command.xauth_file);
    putenv(strdup(buf));
    //PT("cookie %s \n", _mcookie);
-   _entrance_session_cookie_add(_mcookie, dname,
+   _entrance_session_cookie_add(_mcookie, _dname,
                             entrance_config->command.xauth_path,
                             entrance_config->command.xauth_file);
    _entrance_session_desktops_init();
-   _dname = dname;
 }
 
 void
diff --git a/src/daemon/entrance_session.h b/src/daemon/entrance_session.h
index e51ca26..a2f2562 100644
--- a/src/daemon/entrance_session.h
+++ b/src/daemon/entrance_session.h
@@ -3,6 +3,7 @@
 #include <pwd.h>
 
 void entrance_session_init(const char *dname);
+void entrance_session_cookie(void);
 void entrance_session_end(const char *login);
 void entrance_session_shutdown(void);
 Eina_Bool entrance_session_authenticate(const char *login, const char *pwd);

-- 


Reply via email to