Changeset 1244 for pjproject/trunk/pjlib/src/pj/ioqueue_symbian.cpp
- Timestamp:
- May 2, 2007 6:54:19 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/src/pj/ioqueue_symbian.cpp
r1235 r1244 217 217 } 218 218 219 if (iStatus==KRequestPending) { 220 SetActive(); 221 return PJ_EPENDING; 222 } else { 223 // Complete immediately (with success or error) 224 if (iStatus == KErrNone) { 225 *size = aBufferPtr_.Length(); 226 HandleReadCompletion(); 227 return PJ_SUCCESS; 228 } 229 else { 230 pending_data_.read_.op_key_ = NULL; 231 pending_data_.read_.addr_ = NULL; 232 pending_data_.read_.addrlen_ = NULL; 233 return PJ_RETURN_OS_ERROR(iStatus.Int()); 234 } 235 } 219 SetActive(); 220 return PJ_EPENDING; 236 221 } 237 222 … … 261 246 sock_->Socket().Accept(blank_sock_, iStatus); 262 247 263 if (iStatus==KRequestPending) { 264 SetActive(); 265 return PJ_EPENDING; 266 } else { 267 // Accept() completed immediately (with success or error). 268 if (iStatus == KErrNone) { 269 HandleAcceptCompletion(); 270 return PJ_SUCCESS; 271 } 272 else { 273 pending_data_.accept_.op_key_ = NULL; 274 pending_data_.accept_.new_sock_ = NULL; 275 pending_data_.accept_.local_ = NULL; 276 pending_data_.accept_.remote_ = NULL; 277 pending_data_.accept_.addrlen_ = NULL; 278 return PJ_RETURN_OS_ERROR(iStatus.Int()); 279 } 280 } 248 SetActive(); 249 return PJ_EPENDING; 281 250 } 282 251 … … 287 256 void CIoqueueCallback::HandleReadCompletion() 288 257 { 289 290 291 292 293 294 295 296 297 258 if (pending_data_.read_.addr_) { 259 PjSymbianOS::Addr2pj(aAddress_, 260 *(pj_sockaddr_in*)pending_data_.read_.addr_); 261 pending_data_.read_.addr_ = NULL; 262 } 263 if (pending_data_.read_.addrlen_) { 264 *pending_data_.read_.addrlen_ = sizeof(pj_sockaddr_in); 265 pending_data_.read_.addrlen_ = NULL; 266 } 298 267 299 268 pending_data_.read_.op_key_ = NULL; 300 269 } 301 270
Note: See TracChangeset
for help on using the changeset viewer.