Browse code

sl: export embedded api functions via mod_register()

Daniel-Constantin Mierla authored on 12/04/2016 06:19:03
Showing 1 changed files
... ...
@@ -50,6 +50,7 @@
50 50
 #include "../../mod_fix.h"
51 51
 #include "../../script_cb.h"
52 52
 #include "../../mem/mem.h"
53
+#include "../../kemi.h"
53 54
 
54 55
 #include "../../modules/tm/tm_load.h"
55 56
 
... ...
@@ -499,3 +500,27 @@ static int bind_sl(sl_api_t* api)
499 500
 
500 501
 	return 0;
501 502
 }
503
+
504
+/**
505
+ *
506
+ */
507
+static sr_kemi_t sl_kemi_exports[] = {
508
+	{ str_init("sl"), str_init("sreply"),
509
+		SR_KEMIP_INT, sl_send_reply_str,
510
+		{ SR_KEMIP_INT, SR_KEMIP_STR, SR_KEMIP_NONE,
511
+			SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
512
+	},
513
+	{ str_init("sl"), str_init("freply"),
514
+		SR_KEMIP_INT, send_reply,
515
+		{ SR_KEMIP_INT, SR_KEMIP_STR, SR_KEMIP_NONE,
516
+			SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
517
+	},
518
+
519
+	{ {0, 0}, {0, 0}, 0, NULL, { 0, 0, 0, 0, 0, 0 } }
520
+};
521
+
522
+int mod_register(char *path, int *dlflags, void *p1, void *p2)
523
+{
524
+	sr_kemi_modules_add(sl_kemi_exports);
525
+	return 0;
526
+}