diff options
| author | yangwei <[email protected]> | 2024-05-23 03:26:18 +0800 |
|---|---|---|
| committer | yangwei <[email protected]> | 2024-05-23 03:26:18 +0800 |
| commit | a44d5c9ecaadf4f841c0f4da69352c2825154ab4 (patch) | |
| tree | c16a87d90bea0cebcbde966cb977350235016184 | |
| parent | c9791a82cefed8172761918ef361d7b1a7ae322d (diff) | |
✨ feat(get sidlist): cstream_opt instead of rawpkt_opt
| -rw-r--r-- | src/plugin_manager/plugin_manager.c | 2 | ||||
| -rw-r--r-- | src/stellar_on_sapp/stellar_on_sapp_api.c | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/plugin_manager/plugin_manager.c b/src/plugin_manager/plugin_manager.c index f14385f..0c1c693 100644 --- a/src/plugin_manager/plugin_manager.c +++ b/src/plugin_manager/plugin_manager.c @@ -752,7 +752,6 @@ int stellar_polling_plugin_register(struct stellar *st, plugin_on_polling_func o return (POLLING_PULGIN_ID_BASE+utarray_len(plug_mgr->registered_polling_plugin_array));// return polling plugin_id } -// FIXME: scheduler with return value int plugin_manager_on_polling(struct plugin_manager_schema *plug_mgr) { if(plug_mgr->registered_polling_plugin_array == NULL)return 0; @@ -804,7 +803,6 @@ void plugin_manager_on_session_ingress(struct session *sess,const struct packet struct plugin_manager_runtime *plug_mgr_rt = session_plugin_manager_runtime_get(sess); if(plug_mgr_rt==NULL)return; int topic_id = -1; - // FIXME: update internal api in stellar switch (packet_get_type(pkt)) { case TCP: diff --git a/src/stellar_on_sapp/stellar_on_sapp_api.c b/src/stellar_on_sapp/stellar_on_sapp_api.c index 864f6ce..0802033 100644 --- a/src/stellar_on_sapp/stellar_on_sapp_api.c +++ b/src/stellar_on_sapp/stellar_on_sapp_api.c @@ -481,11 +481,14 @@ uint16_t *session_get0_segment_id_list(struct session *sess, int session_directi struct streaminfo *pstream=sess->pstream; assert(pstream); struct segment_id_list *sids = NULL; - int ret = get_rawpkt_opt_from_streaminfo(pstream, RAW_PKT_GET_SID_LIST, &sids);//TODO: using stream_opt_get api + int len=sizeof(void*); + enum MESA_stream_opt opt=((session_direction==SESSION_DIRECTION_IN)?(MSO_STREAM_INBOND_SEGMENT_ID_LIST):(MSO_STREAM_OUTBOND_SEGMENT_ID_LIST)); + int ret = MESA_get_stream_opt(pstream, opt, &sids, &len); if (ret != sizeof(struct segment_id_list))return NULL; *sid_num=sids->sz_sidlist; return sids->sid_list; } + const char *session_get0_route_ctx(struct session *sess, int session_direction, size_t *route_ctx_len) { struct streaminfo *pstream=sess->pstream; |
