Changeset e936e8e in mainline for uspace/lib/usb/src/pipes.c
- Timestamp:
- 2011-02-22T14:31:09Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3b5d1535
- Parents:
- 9f554e64
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/src/pipes.c
r9f554e64 re936e8e 191 191 assert(pipe); 192 192 193 if ( pipe->hc_phone >= 0) {193 if (usb_endpoint_pipe_is_session_started(pipe)) { 194 194 return EBUSY; 195 195 } … … 217 217 assert(pipe); 218 218 219 if ( pipe->hc_phone < 0) {219 if (!usb_endpoint_pipe_is_session_started(pipe)) { 220 220 return ENOENT; 221 221 } … … 229 229 230 230 return EOK; 231 } 232 233 /** Tell whether a session is started (open) on the endpoint pipe. 234 * 235 * The expected usage of this function is in assertions for some 236 * nested functions. 237 * 238 * @param pipe Endpoint pipe in question. 239 * @return Whether @p pipe has opened a session. 240 */ 241 bool usb_endpoint_pipe_is_session_started(usb_endpoint_pipe_t *pipe) 242 { 243 return (pipe->hc_phone >= 0); 231 244 } 232 245
Note:
See TracChangeset
for help on using the changeset viewer.