aboutsummaryrefslogtreecommitdiff
path: root/websocksy.c
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2019-06-01 17:56:33 +0200
committercbdev <cb@cbcdn.com>2019-06-01 17:56:33 +0200
commit92a291b5fae32caba2212192bc94b8ef568c362d (patch)
tree826a2b0d8930afa464ed15a1518a85d062869d1a /websocksy.c
parente16f061a715eb0d49a4872f7cc8c7bb58bb6e888 (diff)
downloadwebsocksy-92a291b5fae32caba2212192bc94b8ef568c362d.tar.gz
websocksy-92a291b5fae32caba2212192bc94b8ef568c362d.tar.bz2
websocksy-92a291b5fae32caba2212192bc94b8ef568c362d.zip
Implement plugin loading
Diffstat (limited to 'websocksy.c')
-rw-r--r--websocksy.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/websocksy.c b/websocksy.c
index 1bd1abf..f625174 100644
--- a/websocksy.c
+++ b/websocksy.c
@@ -21,7 +21,8 @@
/* TODO
* - TLS
- * - framing function discovery / registry
+ * - plugin loading
+ * - config file
* - WS p2p
*/
@@ -111,8 +112,8 @@ static peer_transport client_detect_transport(char* host){
memmove(host, host + 9, strlen(host) - 8);
return peer_fifo_rx;
}
- else if(!strncmp(host, "unix://", 8)){
- memmove(host, host + 8, strlen(host) - 7);
+ else if(!strncmp(host, "unix://", 7)){
+ memmove(host, host + 7, strlen(host) - 6);
return peer_unix_stream;
}
else if(!strncmp(host, "unix-dgram://", 13)){
@@ -213,7 +214,7 @@ static int args_parse(int argc, char** argv){
config.backend.cleanup();
}
//load the backend plugin
- if(plugin_backend_load(argv[u + 1], &(config.backend))){
+ if(plugin_backend_load(PLUGINS, argv[u + 1], &(config.backend))){
return 1;
}
if(config.backend.init() != WEBSOCKSY_API_VERSION){