Removed unused display variable.
I just realized this variable was unused in the original code, and in my patched version. I removed it. Signed-off-by: Alex Cornejo <acornejo@gmail.com> Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
07b8751ad9
commit
07d8168a45
|
@ -44,7 +44,6 @@
|
|||
|
||||
struct sockaddr_un *addr;
|
||||
int csfd;
|
||||
char *display;
|
||||
|
||||
/** Initialize the client and server socket connections.
|
||||
* If something goes wrong, preserves errno.
|
||||
|
@ -56,7 +55,7 @@ sockets_init(void)
|
|||
if((csfd = socket_getclient()) < 0)
|
||||
return false;
|
||||
|
||||
if(!(addr = socket_open(csfd, display, SOCKET_MODE_CONNECT)))
|
||||
if(!(addr = socket_open(csfd, SOCKET_MODE_CONNECT)))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
@ -190,7 +189,7 @@ exit_help(int exit_code)
|
|||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
char buf[1024], *msg, *prompt;
|
||||
char buf[1024], *msg, *prompt, *display;
|
||||
int ret_value = EXIT_SUCCESS;
|
||||
ssize_t len, msg_len = 1;
|
||||
|
||||
|
|
|
@ -33,14 +33,13 @@
|
|||
|
||||
#define CONTROL_UNIX_SOCKET_PATH ".awesome_ctl."
|
||||
|
||||
/** Open a communication socket with awesome for a given display.
|
||||
/** Open a communication socket with awesome.
|
||||
* \param csfd The socket file descriptor.
|
||||
* \param display the display number
|
||||
* \param mode The open mode, either Bind or Connect.
|
||||
* \return sockaddr_un Struct ready to be used or NULL if a problem ocurred.
|
||||
*/
|
||||
struct sockaddr_un *
|
||||
socket_open(int csfd, const char *display, const socket_mode_t mode)
|
||||
socket_open(int csfd, const socket_mode_t mode)
|
||||
{
|
||||
char *host = NULL;
|
||||
int screenp = 0, displayp = 0;
|
||||
|
|
|
@ -28,7 +28,7 @@ typedef enum
|
|||
SOCKET_MODE_CONNECT
|
||||
} socket_mode_t;
|
||||
|
||||
struct sockaddr_un *socket_open(const int, const char *, const socket_mode_t);
|
||||
struct sockaddr_un *socket_open(const int, const socket_mode_t);
|
||||
int socket_getclient(void);
|
||||
|
||||
#endif
|
||||
|
|
2
luaa.c
2
luaa.c
|
@ -1115,7 +1115,7 @@ luaA_cs_init(void)
|
|||
if (csfd < 0 || fcntl(csfd, F_SETFD, FD_CLOEXEC) == -1)
|
||||
return;
|
||||
|
||||
if(!(addr = socket_open(csfd, getenv("DISPLAY"), SOCKET_MODE_BIND)))
|
||||
if(!(addr = socket_open(csfd, SOCKET_MODE_BIND)))
|
||||
{
|
||||
warn("error binding UNIX domain socket: %s", strerror(errno));
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue