Enlightenment CVS committal
Author : xcomputerman
Project : e17
Module : apps/entrance
Dir : e17/apps/entrance/src/client
Modified Files:
entrance_edit.c entrance_ipc.c entrance_ipc.h main.c
Log Message:
- Kill compiler warning on entrance_edit
- IPC title now includes server pid so as to permit multiple instances
of entranced to play nice together
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/client/entrance_edit.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- entrance_edit.c 16 Mar 2004 16:03:03 -0000 1.3
+++ entrance_edit.c 28 Mar 2004 03:57:01 -0000 1.4
@@ -132,6 +132,8 @@
}
return (result);
}
+
+#if 0
static int
is_valid_avatar_theme_eet(Evas_Object * o, const char *file)
{
@@ -148,6 +150,7 @@
return (result);
}
+#endif
/**
* when Enter is hit on the keyboard we end up here
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/client/entrance_ipc.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- entrance_ipc.c 25 Mar 2004 06:44:52 -0000 1.3
+++ entrance_ipc.c 28 Mar 2004 03:57:01 -0000 1.4
@@ -3,10 +3,9 @@
*========================================================================*/
#include "entrance_ipc.h"
-#define IPC_TITLE "entrance_ipc"
static Ecore_Ipc_Server *server = NULL;
-
static Entrance_Session *_session = NULL;
+static char *ipc_title = NULL;
/**
* _entrance_ipc_server_add - when we connect to the ipc daemon
@@ -127,23 +126,21 @@
return TRUE;
}
-/**
- * entrance_ipc_init - returns 1 if the app should continue, 0 if a process
- * already is running
- * @argc - the number of arguments passed to entrance
- * @argv - the string arguments passed to entrance
- * Basically it tries to connect to an already running entrance ipc server.
- * If it successfully connects, it sends the filenames to the current entrance
- * daemon and should exit. If it does not successfully connect it registers
- * itself as the server and the app should then start up.
- */
int
-entrance_ipc_init(int argc, const char **argv)
+entrance_ipc_init(pid_t server_pid)
{
+ char buf[80];
+
/* we definitely fail if we can't connect to ecore_ipc */
if (ecore_ipc_init() < 1)
return FALSE;
+ memset(buf, 0, sizeof(buf));
+ snprintf(buf, 80, "%s_%d", IPC_TITLE, server_pid);
+ if (ipc_title)
+ free(ipc_title);
+ ipc_title = strdup(buf);
+
if ((server =
ecore_ipc_server_connect(ECORE_IPC_LOCAL_USER, IPC_TITLE, 0, NULL)))
{
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/client/entrance_ipc.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- entrance_ipc.h 25 Mar 2004 06:46:02 -0000 1.3
+++ entrance_ipc.h 28 Mar 2004 03:57:01 -0000 1.4
@@ -1,19 +1,21 @@
-#ifndef ENTRANCE_IPC_H
-#define ENTRANCE_IPC_H
+#ifndef __ENTRANCE_IPC_H
+#define __ENTRANCE_IPC_H
#include <sys/types.h>
#include <Ecore.h>
#include <Ecore_Ipc.h>
#include <stdio.h>
+#include <string.h>
#include <limits.h>
#include <sys/types.h>
+#include <unistd.h>
#include "../ipc.h"
#include "entrance_session.h"
void entrance_ipc_shutdown(void);
-int entrance_ipc_init(int argc, const char **argv);
+int entrance_ipc_init(pid_t server_pid);
int entrance_ipc_connected_get(void);
void entrance_ipc_session_set(Entrance_Session *session);
void entrance_ipc_request_xauth(char *homedir, uid_t uid, gid_t gid);
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/client/main.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -3 -r1.47 -r1.48
--- main.c 25 Mar 2004 06:44:52 -0000 1.47
+++ main.c 28 Mar 2004 03:57:01 -0000 1.48
@@ -582,21 +582,19 @@
char *theme = NULL;
char *config = NULL;
int fs_en = 1;
+ pid_t server_pid = 0;
/* Basic ecore initialization */
if (!ecore_init())
return (-1);
ecore_app_args_set(argc, (const char **) argv);
- if (!entrance_ipc_init(argc, (const char **) argv))
- return (-1);
-
/* Parse command-line options */
while (1)
{
char *t;
- c = getopt_long(argc, argv, "hd:g:t:Tc:", d_opt, NULL);
+ c = getopt_long(argc, argv, "hd:g:t:Tc:z:", d_opt, NULL);
if (c == -1)
break;
switch (c)
@@ -653,11 +651,17 @@
case 'c':
config = strdup(optarg);
break;
+ case 'z':
+ server_pid = (pid_t) atoi(optarg);
+ break;
default:
entrance_help(argv);
}
}
+ if (!entrance_ipc_init(server_pid))
+ return -1;
+
session = entrance_session_new(config);
if (config)
free(config);
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs