Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usb/src/pipes.c

    re936e8e r27a0012  
    191191        assert(pipe);
    192192
    193         if (usb_endpoint_pipe_is_session_started(pipe)) {
     193        if (pipe->hc_phone >= 0) {
    194194                return EBUSY;
    195195        }
     
    217217        assert(pipe);
    218218
    219         if (!usb_endpoint_pipe_is_session_started(pipe)) {
     219        if (pipe->hc_phone < 0) {
    220220                return ENOENT;
    221221        }
     
    229229
    230230        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);
    244231}
    245232
Note: See TracChangeset for help on using the changeset viewer.