Changeset a9c674e0 in mainline for uspace/lib/usb/src/pipes.c
- Timestamp:
- 2011-02-23T15:38:53Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 233e68d, a80849c
- Parents:
- eb1a2f4 (diff), d3880aa (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/src/pipes.c
reb1a2f4 ra9c674e0 200 200 assert(pipe); 201 201 202 if ( pipe->hc_phone >= 0) {202 if (usb_endpoint_pipe_is_session_started(pipe)) { 203 203 return EBUSY; 204 204 } … … 226 226 assert(pipe); 227 227 228 if ( pipe->hc_phone < 0) {228 if (!usb_endpoint_pipe_is_session_started(pipe)) { 229 229 return ENOENT; 230 230 } … … 238 238 239 239 return EOK; 240 } 241 242 /** Tell whether a session is started (open) on the endpoint pipe. 243 * 244 * The expected usage of this function is in assertions for some 245 * nested functions. 246 * 247 * @param pipe Endpoint pipe in question. 248 * @return Whether @p pipe has opened a session. 249 */ 250 bool usb_endpoint_pipe_is_session_started(usb_endpoint_pipe_t *pipe) 251 { 252 return (pipe->hc_phone >= 0); 240 253 } 241 254
Note:
See TracChangeset
for help on using the changeset viewer.