2
0
Эх сурвалжийг харах

textopsx: set the tcp clone rcvbuf on in mod init

Daniel-Constantin Mierla 13 жил өмнө
parent
commit
843c3bf661

+ 15 - 1
modules/textopsx/textopsx.c

@@ -33,6 +33,7 @@
 #include "../../dprint.h"
 #include "../../dprint.h"
 #include "../../data_lump.h"
 #include "../../data_lump.h"
 #include "../../msg_translator.h"
 #include "../../msg_translator.h"
+#include "../../tcp_options.h"
 #include "../../mod_fix.h"
 #include "../../mod_fix.h"
 
 
 #include "api.h"
 #include "api.h"
@@ -53,6 +54,8 @@ static int fixup_fnmatch(void** param, int param_no);
 static int w_remove_body_f(struct sip_msg*, char*, char *);
 static int w_remove_body_f(struct sip_msg*, char*, char *);
 static int bind_textopsx(textopsx_api_t *tob);
 static int bind_textopsx(textopsx_api_t *tob);
 
 
+static int mod_init(void);
+
 /* cfg functions */
 /* cfg functions */
 static cmd_export_t cmds[] = {
 static cmd_export_t cmds[] = {
 	{"msg_apply_changes",    (cmd_function)msg_apply_changes_f,     0,
 	{"msg_apply_changes",    (cmd_function)msg_apply_changes_f,     0,
@@ -80,7 +83,7 @@ struct module_exports exports= {
 	cmds, /* cfg functions */
 	cmds, /* cfg functions */
 	0, /* RPC methods */
 	0, /* RPC methods */
 	0, /* cfg parameters */
 	0, /* cfg parameters */
-	0, /* initialization function */
+	mod_init, /* initialization function */
 	0, /* response function */
 	0, /* response function */
 	0, /* destroy function */
 	0, /* destroy function */
 	0, /* on_cancel function */
 	0, /* on_cancel function */
@@ -88,6 +91,17 @@ struct module_exports exports= {
 };
 };
 
 
 
 
+/**
+ * init module function
+ */
+static int mod_init(void)
+{
+#ifdef USE_TCP
+	tcp_set_clone_rcvbuf(1);
+#endif
+	return 0;
+}
+
 /**
 /**
  *
  *
  */
  */