]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
msg/async: return right away in NetHandler::set_priority() if not supported 14795/head
authorKefu Chai <kchai@redhat.com>
Wed, 26 Apr 2017 02:47:29 +0000 (10:47 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 26 Apr 2017 04:16:57 +0000 (12:16 +0800)
commit6f1037e22c2a304795895498cdc955e0ef80f8e3
tree40680b3b1f45d149869d67a49cf637d0ed59db7d
parent024314e9128793667dc4d080c19a365091d4af5b
msg/async: return right away in NetHandler::set_priority() if not supported

* SO_PRIORITY is linux specific, so no need to check __linux__
* early return if priority is less than 0 (maybe we should also return if
  it's higher than 6?), the less indent.
* store errno if fails to set SO_PRIORITY before printing log messages.
* guard the whole function with '#ifdef SO_PRIORITY' so on platforms
  where this option is not supported, this function will be a no-op.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/msg/async/net_handler.cc
src/msg/simple/Pipe.cc