]> granicus.if.org Git - libevent/commitdiff
bufferevent: allow setting priority on socket and openssl type
authorNicolas J. Bouliane <nicboul@gmail.com>
Sun, 3 May 2020 00:32:10 +0000 (00:32 +0000)
committerNicolas J. Bouliane <nicboul@gmail.com>
Sun, 3 May 2020 00:32:10 +0000 (00:32 +0000)
bufferevent_sock.c

index e92f46f3e0b8b4b9c7a1b29bf947e556ed4cedba..eca7b315f874486b2a8556d29e9c06d752fe84cd 100644 (file)
@@ -661,7 +661,7 @@ bufferevent_priority_set(struct bufferevent *bufev, int priority)
        struct bufferevent_private *bufev_p = BEV_UPCAST(bufev);
 
        BEV_LOCK(bufev);
-       if (!BEV_IS_SOCKET(bufev))
+       if (BEV_IS_ASYNC(bufev) || BEV_IS_FILTER(bufev) || BEV_IS_PAIR(bufev))
                goto done;
 
        if (event_priority_set(&bufev->ev_read, priority) == -1)