summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLubos Lunak <l.lunak@ suse.cz>2006-04-19 17:03:27 +0000
committerLubos Lunak <l.lunak@ suse.cz>2006-04-19 17:03:27 +0000
commite9acbe23923d2de9a94b2642d9fb105e65729c79 (patch)
treeaf7d12c621a489afd16d550f959f8e7848dcecc1 /lib
parent86fa3e12b36ca075ceff69ea8c63954572f17cdc (diff)
Fallback daemon doesn't make sense.
Diffstat (limited to 'lib')
-rw-r--r--lib/comm.c25
-rw-r--r--lib/comm.h3
2 files changed, 5 insertions, 23 deletions
diff --git a/lib/comm.c b/lib/comm.c
index 7c31ea9..f368b82 100644
--- a/lib/comm.c
+++ b/lib/comm.c
@@ -33,27 +33,22 @@ static void getDisplay( char* ret, int max )
*pos = '\0';
}
-static void socketName( char* sock_file, const char* name, int max )
+static void socketName( char* sock_file, int max )
{
const char* home;
char display[ 256 ];
home = getenv( "HOME" );
getDisplay( display, 255 );
- snprintf( sock_file, max - 1, "%s/.dapi-%s%s%s", home, display, name != NULL ? "-" : "", name );
+ snprintf( sock_file, max - 1, "%s/.dapi-%s", home, display );
}
DapiConnection* dapi_connect()
{
- return dapi_namedConnect( "" );
- }
-
-DapiConnection* dapi_namedConnect( const char* name )
- {
char sock_file[ 256 ];
int sock;
struct sockaddr_un addr;
DapiConnection* ret;
- socketName( sock_file, name, 255 );
+ socketName( sock_file, 255 );
sock = socket( PF_UNIX, SOCK_STREAM, 0 );
if( sock < 0 )
{
@@ -82,15 +77,10 @@ DapiConnection* dapi_namedConnect( const char* name )
int dapi_bindSocket()
{
- return dapi_namedBindSocket( "" );
- }
-
-int dapi_namedBindSocket( const char* name )
- {
char sock_file[ 256 ];
int sock;
struct sockaddr_un addr;
- socketName( sock_file, name, 255 );
+ socketName( sock_file, 255 );
sock = socket( PF_UNIX, SOCK_STREAM, 0 );
if( sock < 0 )
{
@@ -364,12 +354,7 @@ void dapi_windowInfoInitWindow( DapiWindowInfo* winfo, long window )
DapiConnection* dapi_connectAndInit()
{
- return dapi_namedConnectAndInit( "" );
- }
-
-DapiConnection* dapi_namedConnectAndInit( const char* name )
- {
- DapiConnection* conn = dapi_namedConnect( name );
+ DapiConnection* conn = dapi_connect();
if( conn == NULL )
return NULL;
if( !dapi_Init( conn ))
diff --git a/lib/comm.h b/lib/comm.h
index 987a7fd..c1543e5 100644
--- a/lib/comm.h
+++ b/lib/comm.h
@@ -8,15 +8,12 @@ extern "C" {
typedef struct DapiConnection DapiConnection;
DapiConnection* dapi_connect( void );
-DapiConnection* dapi_namedConnect( const char* name );
void dapi_close( DapiConnection* conn );
int dapi_socket( DapiConnection* conn );
DapiConnection* dapi_connectAndInit( void );
-DapiConnection* dapi_namedConnectAndInit( const char* name );
int dapi_bindSocket( void );
-int dapi_namedBindSocket( const char* name );
DapiConnection* dapi_acceptSocket( int sock );
typedef struct DapiWindowInfo