增加sender_scm的初始化调用

This commit is contained in:
luqiuwen
2019-06-02 16:29:43 +08:00
parent e4f490fcd3
commit 57f5a4d906
4 changed files with 15 additions and 1 deletions

View File

@@ -2,6 +2,7 @@
#include <tfe_stream.h>
#include <event2/event.h>
#include <sender_scm.h>
#include <ssl_stream_core.h>
struct ssl_mgr;
@@ -99,6 +100,7 @@ struct tfe_proxy
struct acceptor_kni_v1 * kni_v1_acceptor;
struct acceptor_kni_v2 * kni_v2_acceptor;
struct sender_scm * scm_sender;
/* DEBUG OPTIONS */
unsigned int tcp_all_passthrough;

View File

@@ -1,4 +1,5 @@
#pragma once
struct sender_scm;
struct sender_scm* sender_scm_init(const char *profile, void *logger);
void send_scm_destroy(struct sender_scm *sender);
struct sender_scm* sender_scm_init(const char *profile, const char *section, void *logger);

View File

@@ -435,6 +435,10 @@ int main(int argc, char * argv[])
tfe_proxy_work_thread_create_ctx(g_default_proxy);
tfe_proxy_acceptor_init(g_default_proxy, main_profile);
/* SCM Sender */
g_default_proxy->scm_sender = sender_scm_init(main_profile, "sender_scm", g_default_logger);
CHECK_OR_EXIT(g_default_proxy->scm_sender != NULL, "Failed at creating scm sender, Exit.");
/* PLUGIN INIT */
unsigned int plugin_iterator = 0;
for (struct tfe_plugin * plugin_iter = tfe_plugin_iterate(&plugin_iterator);

View File

@@ -3,6 +3,12 @@
#include "sender_scm.h"
#include "tfe_cmsg.h"
int main()
{
return 0;
}
#if 0
int main(){
struct tfe_cmsg *cmsg = tfe_cmsg_init();
@@ -31,3 +37,4 @@ int main(){
}
return 0;
}
#endif