Browse code

Initial configuration management for sshchatd

Dario Rodriguez authored on 17/12/2015 21:38:20
Showing 1 changed files
... ...
@@ -7,4 +7,34 @@
7 7
  * This program is licensed under the terms of the GPL v2.1+
8 8
  */
9 9
 
10
+#include <stdlib.h>
11
+#include <stdio.h>
12
+#include <unistd.h>
13
+#include <string.h>
10 14
 
15
+#include "socklib.h"
16
+#include "sbuf.h"
17
+
18
+#include "sshchat.h"
19
+#include "sshchatd_config.h"
20
+
21
+int
22
+main(int argc, char *argv[])
23
+{
24
+	cconfig *conf;
25
+	if((conf=cconfig_init())==NULL) {
26
+		fprintf(stderr,"ERROR: Couldn't init user data. Maybe there are no users in users/ ?\n");
27
+		return(1);
28
+	}
29
+#warning TODO
30
+	fprintf(stderr,"%i users loaded.\n",conf->numusers);
31
+	{
32
+		int i;
33
+		for(i=0;i<conf->numusers;i++) {
34
+			fprintf(stderr," [%i]: \"%s\"\n",i,conf->users[i]);
35
+		}
36
+	}
37
+#warning TODO
38
+	cconfig_free(conf),conf=NULL;
39
+	return(0);
40
+}
Browse code

Initial implementation of sshchat client as a simple forwarder (with bugs)

Dario Rodriguez authored on 16/12/2015 21:52:13
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,10 @@
1
+/*
2
+ * sshchatd.c
3
+ *
4
+ * Server component of sshchat, serves as mailbox for disconnected users.
5
+ *
6
+ * Author: Dario Rodriguez dario@softhome.net
7
+ * This program is licensed under the terms of the GPL v2.1+
8
+ */
9
+
10
+