Changeset 2969 for pjproject


Ignore:
Timestamp:
Oct 26, 2009 2:09:09 PM (15 years ago)
Author:
nanang
Message:

Misc fix (#951): Updated active socket to keep passing the packet pointer, instead of NULL, when connection is closed/error and no remainder data, as application, e.g: SSL sock, may need to have access on it.

File:
1 edited

Legend:

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

    r2394 r2969  
    459459                 * If there is no remainder data, set the packet to NULL. 
    460460                 */ 
    461                 ret = (*asock->cb.on_data_read)(asock, (r->size? r->pkt:NULL), 
    462                                                 r->size, status, &remainder); 
     461 
     462                /* Shouldn't set the packet to NULL, as there may be active  
     463                 * socket user, such as SSL socket, that needs to have access 
     464                 * to the read buffer packet. 
     465                 */ 
     466                //ret = (*asock->cb.on_data_read)(asock, (r->size? r->pkt:NULL), 
     467                //                              r->size, status, &remainder); 
     468                ret = (*asock->cb.on_data_read)(asock, r->pkt, r->size, 
     469                                                status, &remainder); 
    463470 
    464471            } else if (asock->read_type == TYPE_RECV_FROM &&  
Note: See TracChangeset for help on using the changeset viewer.