* 修改tfe支持subscribe_id
This commit is contained in:
@@ -429,7 +429,7 @@ void subscribe_id_new_cb(int table_id, const char* key, const char* table_line,
|
||||
{
|
||||
int ret=0;
|
||||
size_t subscribe_id_offset, len;
|
||||
ret=get_column_pos(table_line, 7, &subscribe_id_offset, &len);
|
||||
ret=get_column_pos(table_line, 4, &subscribe_id_offset, &len);
|
||||
if(ret<0)
|
||||
{
|
||||
TFE_LOG_ERROR(g_pangu_rt->local_logger, "Add subscribe ID faild: %s", table_line);
|
||||
@@ -910,7 +910,7 @@ int pangu_policy_init(const char* profile_path, const char* static_section, cons
|
||||
{
|
||||
goto error_out;
|
||||
}
|
||||
g_pangu_rt->subscriber_id_table_id=Maat_table_register(g_pangu_rt->dyn_maat, "IPD_DYN_SUBSCRIBE_IP");
|
||||
g_pangu_rt->subscriber_id_table_id=Maat_table_register(g_pangu_rt->dyn_maat, "TSG_DYN_SUBSCRIBE_IP");
|
||||
ret=Maat_plugin_EX_register(g_pangu_rt->dyn_maat,
|
||||
g_pangu_rt->subscriber_id_table_id,
|
||||
subscribe_id_new_cb,
|
||||
@@ -2347,7 +2347,7 @@ void pangu_on_http_begin(const struct tfe_stream * stream,
|
||||
if(source_subscribe_id!=NULL)
|
||||
{
|
||||
scan_ret = Maat_full_scan_string(g_pangu_rt->maat, g_pangu_rt->scan_table_id[PXY_CTRL_SUBSCRIBE_ID],
|
||||
CHARSET_UTF8, sip, strlen(sip),
|
||||
CHARSET_UTF8, source_subscribe_id, strlen(source_subscribe_id),
|
||||
result+hit_cnt, NULL, MAX_SCAN_RESULT-hit_cnt,
|
||||
&(ctx->scan_mid), (int) thread_id);
|
||||
if(scan_ret>0)
|
||||
@@ -2358,7 +2358,7 @@ void pangu_on_http_begin(const struct tfe_stream * stream,
|
||||
if(dest_subscribe_id!=NULL)
|
||||
{
|
||||
scan_ret = Maat_full_scan_string(g_pangu_rt->maat, g_pangu_rt->scan_table_id[PXY_CTRL_SUBSCRIBE_ID],
|
||||
CHARSET_UTF8, dip, strlen(dip),
|
||||
CHARSET_UTF8, dest_subscribe_id, strlen(dest_subscribe_id),
|
||||
result+hit_cnt, NULL, MAX_SCAN_RESULT-hit_cnt,
|
||||
&(ctx->scan_mid), (int) thread_id);
|
||||
if(scan_ret>0)
|
||||
|
||||
Reference in New Issue
Block a user