[X2Go-Commits] lightdm-remote-session-x2go.git - build-main (branch) updated: e610f6f207135dd5513a2c3120bf0ae391db2910
X2Go dev team
git-admin at x2go.org
Sat Apr 27 13:49:57 CEST 2013
The branch, build-main has been updated
via e610f6f207135dd5513a2c3120bf0ae391db2910 (commit)
from 4dd6128c153ea94ea70a22a5d8a4fc50ea59ddbd (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
socket-sucker.c | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
The diff of changes is:
diff --git a/socket-sucker.c b/socket-sucker.c
index 46af2d6..0b1ee27 100644
--- a/socket-sucker.c
+++ b/socket-sucker.c
@@ -1,13 +1,47 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+
+#define BUFFER_SIZE 256
int
main (int argc, char * argv[])
{
+ int socket_fd = 0;
+ int servlen = 0;
+ struct sockaddr_un serv_addr;
+ bzero((char *)&serv_addr, sizeof(serv_addr));
+ serv_addr.sun_family = AF_UNIX;
+ strcpy(serv_addr.sun_path, "/home/ted/.freerdp-socket");
+ servlen = strlen(serv_addr.sun_path) + sizeof(serv_addr.sun_family);
+ if ((socket_fd = socket(AF_UNIX, SOCK_STREAM,0)) < 0) {
+ return -1;
+ }
+ if (connect(socket_fd, (struct sockaddr *)&serv_addr, servlen) < 0) {
+ return -1;
+ }
+ char buffer[BUFFER_SIZE + 2];
+ int in = 0;
+ int out = 0;
+ in = read(socket_fd, buffer, BUFFER_SIZE);
+ out = write(1, buffer, in);
+ close(socket_fd);
+ if (in == 0) {
+ return 0;
+ } else {
+ return -1;
+ }
}
+
hooks/post-receive
--
lightdm-remote-session-x2go.git (X2Go-based remote login session support for LightDM)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "lightdm-remote-session-x2go.git" (X2Go-based remote login session support for LightDM).
More information about the x2go-commits
mailing list