Changeset 859 for pjproject/trunk


Ignore:
Timestamp:
Dec 25, 2006 6:36:23 AM (18 years ago)
Author:
bennylp
Message:

Fixed ticket #49: When socket is signaled for readability, recv()/recvfrom is called with flags set to zero. It should use the flags as specified when ioqueue_recv()/ioqueue_recvfrom() was called.

File:
1 edited

Legend:

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

    r750 r859  
    418418        if ((read_op->op == PJ_IOQUEUE_OP_RECV_FROM)) { 
    419419            read_op->op = 0; 
    420             rc = pj_sock_recvfrom(h->fd, read_op->buf, &bytes_read, 0, 
     420            rc = pj_sock_recvfrom(h->fd, read_op->buf, &bytes_read,  
     421                                  read_op->flags, 
    421422                                  read_op->rmt_addr,  
    422423                                  read_op->rmt_addrlen); 
    423424        } else if ((read_op->op == PJ_IOQUEUE_OP_RECV)) { 
    424425            read_op->op = 0; 
    425             rc = pj_sock_recv(h->fd, read_op->buf, &bytes_read, 0); 
     426            rc = pj_sock_recv(h->fd, read_op->buf, &bytes_read,  
     427                              read_op->flags); 
    426428        } else { 
    427429            pj_assert(read_op->op == PJ_IOQUEUE_OP_READ); 
     
    441443#           if defined(PJ_WIN32) && PJ_WIN32 != 0 || \ 
    442444               defined(PJ_WIN32_WINCE) && PJ_WIN32_WINCE != 0 
    443                 rc = pj_sock_recv(h->fd, read_op->buf, &bytes_read, 0); 
     445                rc = pj_sock_recv(h->fd, read_op->buf, &bytes_read,  
     446                                  read_op->flags); 
    444447                //rc = ReadFile((HANDLE)h->fd, read_op->buf, read_op->size, 
    445448                //              &bytes_read, NULL); 
Note: See TracChangeset for help on using the changeset viewer.