Changeset 2804 for pjproject/branches/1.0/pjlib/src/pj/sock_symbian.cpp
- Timestamp:
- Jun 25, 2009 12:26:15 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/1.0/pjlib/src/pj/sock_symbian.cpp
r2482 r2804 126 126 void CPjSocketReader::ConstructL(unsigned max_len) 127 127 { 128 TProtocolDesc aProtocol; 129 TInt err; 130 131 err = sock_.Socket().Info(aProtocol); 132 User::LeaveIfError(err); 133 134 isDatagram_ = (aProtocol.iSockType == KSockDatagram); 128 isDatagram_ = sock_.IsDatagram(); 135 129 136 130 TUint8 *ptr = new TUint8[max_len]; … … 518 512 519 513 /* Wrap Symbian RSocket into PJLIB's CPjSocket, and return to caller */ 520 CPjSocket *pjSock = new CPjSocket(af, rSock);514 CPjSocket *pjSock = new CPjSocket(af, type, rSock); 521 515 *p_sock = (pj_sock_t)pjSock; 522 516 … … 734 728 735 729 CPjSocket *pjSock = (CPjSocket*)sock; 736 RSocket &rSock = pjSock->Socket();737 730 738 731 if (pjSock->Reader()) { … … 758 751 TPtr8 data((TUint8*)buf, (TInt)*len, (TInt)*len); 759 752 760 rSock.Recv(data, flags, reqStatus, recvLen); 753 if (pjSock->IsDatagram()) { 754 pjSock->Socket().Recv(data, flags, reqStatus); 755 } else { 756 // Using static like this is not pretty, but we don't need to use 757 // the value anyway, hence doing it like this is probably most 758 // optimal. 759 static TSockXfrLength len; 760 pjSock->Socket().RecvOneOrMore(data, flags, reqStatus, len); 761 } 761 762 User::WaitForRequest(reqStatus); 762 763 … … 998 999 999 1000 // Create PJ socket 1000 CPjSocket *newPjSock = new CPjSocket(pjSock->GetAf(), newSock); 1001 CPjSocket *newPjSock = new CPjSocket(pjSock->GetAf(), pjSock->GetSockType(), 1002 newSock); 1001 1003 newPjSock->SetConnected(true); 1002 1004
Note: See TracChangeset
for help on using the changeset viewer.