diff options
| author | lijia <[email protected]> | 2021-08-09 17:49:02 +0800 |
|---|---|---|
| committer | lijia <[email protected]> | 2021-08-09 17:49:02 +0800 |
| commit | 12d35da1beb241ebe2edf473a1a3a6313f0df4f5 (patch) | |
| tree | 078b54f08817bf8509ebc5211079eff7cf16c07b /src/inner_plug/sapp_assistant.cpp | |
| parent | b72afadb9f8a4dabb6c4fe7a7273d575196e9be1 (diff) | |
TSG-7297, 支持插件获取当前的网络拓扑模式, 方便插件在不同模式下, 一些特殊业务的处理。v4.2.45
Diffstat (limited to 'src/inner_plug/sapp_assistant.cpp')
| -rw-r--r-- | src/inner_plug/sapp_assistant.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/inner_plug/sapp_assistant.cpp b/src/inner_plug/sapp_assistant.cpp index fc0ad33..c3d63df 100644 --- a/src/inner_plug/sapp_assistant.cpp +++ b/src/inner_plug/sapp_assistant.cpp @@ -685,6 +685,18 @@ int sapp_get_platform_opt(enum sapp_platform_opt opt, void *opt_val, int *opt_va } break; + case SPO_DEPLOYMENT_MODE: + { + if(*opt_val_len != sizeof(enum sapp_deploment_mode_t)){ + ret = -1; + sapp_runtime_log(RLOG_LV_INFO, "sapp_get_platform_opt() SPO_DEPLOYMENT_MODE error:opt_val_len:%d is invalid!\n", *opt_val_len); + break; + } + enum sapp_deploment_mode_t *dep_mode = (enum sapp_deploment_mode_t *)opt_val; + *dep_mode = (enum sapp_deploment_mode_t)sapp_global_val->config.packet_io.depolyment_mode_bin; + } + break; + case SPO_CURRENT_STATE: { if(*opt_val_len != sizeof(enum sapp_state_t)){ |
