diff options
| author | yangwei <[email protected]> | 2024-05-23 03:50:57 +0800 |
|---|---|---|
| committer | yangwei <[email protected]> | 2024-05-23 18:30:11 +0800 |
| commit | 405802952395329d4dabb16e7d38ccb90675fad6 (patch) | |
| tree | f742e136272e1d9c127949acd32ff03f410ccf99 | |
| parent | a44d5c9ecaadf4f841c0f4da69352c2825154ab4 (diff) | |
✨ feat(sess current packet): clear current pkt on defer
| -rw-r--r-- | src/stellar_on_sapp/stellar_on_sapp_api.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/stellar_on_sapp/stellar_on_sapp_api.c b/src/stellar_on_sapp/stellar_on_sapp_api.c index 0802033..370e594 100644 --- a/src/stellar_on_sapp/stellar_on_sapp_api.c +++ b/src/stellar_on_sapp/stellar_on_sapp_api.c @@ -141,12 +141,14 @@ unsigned char session_state_update_on_sapp(struct streaminfo *stream, unsigned c void session_poll_on_sapp(struct session *sess) { - if(sess && sess->state != SESSION_STATE_CONTROL) + if(sess==NULL)return; + if(sess->state != SESSION_STATE_CONTROL) { struct packet *pkt = &sess->cur_pkt; if(unlikely(pkt->raw_pkt==NULL))pkt->raw_pkt=get_current_rawpkt_from_streaminfo(sess->pstream); plugin_manager_on_session_egress(sess, pkt); } + sess->cur_pkt.raw_pkt=NULL;//clear raw_pkt } /********************************************* |
