diff options
| author | yangwei <[email protected]> | 2024-08-19 18:20:21 +0800 |
|---|---|---|
| committer | yangwei <[email protected]> | 2024-08-19 18:20:21 +0800 |
| commit | fb69895f77270a30a2cbb86274e6fd077aa13255 (patch) | |
| tree | c5a364527049c98c336fe98a38520c9ce1786efb | |
| parent | 6e92f11af00cfdd756112d1626726f8c1c084e06 (diff) | |
🐞 fix(stellar_mq_dispatch): check sess and pkt before dispatchv2.1.6
| -rw-r--r-- | src/plugin_manager/plugin_manager.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/plugin_manager/plugin_manager.c b/src/plugin_manager/plugin_manager.c index 5f83ef0..57a2ff0 100644 --- a/src/plugin_manager/plugin_manager.c +++ b/src/plugin_manager/plugin_manager.c @@ -586,8 +586,14 @@ static void stellar_mq_dispatch(struct stellar_message *priority_mq[], struct st } DL_FOREACH_SAFE(priority_mq[cur_priority], mq_elt, mq_tmp) { - if(mq_elt->header.type==ON_SESSION_TOPIC)stellar_mq_dispatch_one_session_message(sess, mq_elt); - if(mq_elt->header.type==ON_PACKET_TOPIC)stellar_mq_dispatch_one_packet_message(pkt, mq_elt); + if(mq_elt->header.type==ON_SESSION_TOPIC && sess) + { + stellar_mq_dispatch_one_session_message(sess, mq_elt); + } + if(mq_elt->header.type==ON_PACKET_TOPIC && pkt) + { + stellar_mq_dispatch_one_packet_message(pkt, mq_elt); + } DL_DELETE(priority_mq[mq_elt->header.priority], mq_elt); DL_APPEND(*dealth_letter_queue, mq_elt); // move to dlq list |
