summaryrefslogtreecommitdiffstats
path: root/nserver
diff options
context:
space:
mode:
Diffstat (limited to 'nserver')
-rw-r--r--nserver/src/protocol.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/nserver/src/protocol.c b/nserver/src/protocol.c
new file mode 100644
index 0000000..0d254cd
--- /dev/null
+++ b/nserver/src/protocol.c
@@ -0,0 +1,24 @@
+#include <protocol.h>
+
+static Hashmap *hash;
+
+int ssinit()
+{
+ if (hash == NULL) {
+ hash = Hashmap_create(NULL, NULL);
+ check(hash != NULL, "unable to create hashmap");
+ }
+
+ return 0;
+ error:
+ return -1;
+}
+
+int sscreate(char *key)
+{
+ check(ssinit() == 0, "ssinit failed");
+
+ return 0;
+ error:
+ return -1;
+}