Ignore:
Timestamp:
Nov 7, 2018 4:34:01 AM (11 months ago)
Author:
ming
Message:

Fixed #2160: stuck issue in ioqueue when detaching UDP media transport

  • Fixed transport_udp so it won't call another read operation when being stopped.
  • Add robustness checks (assertion) in ioqueue recv, recvfrom, and accept to prevent the same op key being used twice.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/src/pj/ioqueue_common_abs.c

    r5737 r5907  
    720720 
    721721    read_op = (struct read_operation*)op_key; 
     722    PJ_ASSERT_RETURN(read_op->op == PJ_IOQUEUE_OP_NONE, PJ_EPENDING); 
    722723    read_op->op = PJ_IOQUEUE_OP_NONE; 
    723724 
     
    793794 
    794795    read_op = (struct read_operation*)op_key; 
     796    PJ_ASSERT_RETURN(read_op->op == PJ_IOQUEUE_OP_NONE, PJ_EPENDING); 
    795797    read_op->op = PJ_IOQUEUE_OP_NONE; 
    796798 
     
    11281130 
    11291131    accept_op = (struct accept_operation*)op_key; 
     1132    PJ_ASSERT_RETURN(accept_op->op == PJ_IOQUEUE_OP_NONE, PJ_EPENDING); 
    11301133    accept_op->op = PJ_IOQUEUE_OP_NONE; 
    11311134 
Note: See TracChangeset for help on using the changeset viewer.