ctx->data.append_zero(pad_byte_count);
dout(20) << __func__ << ": " << *ctx << ": Pad byte count: "
<< pad_byte_count << dendl;
- ctx->reply.error = 0;
+ ctx->reply.error = htonl(0);
} else {
ctx->reply.error = htonl(0);
}
}
}
- void stop()
+ ~NBDServer()
{
if (started) {
dout(10) << __func__ << ": terminating" << dendl;
started = false;
}
}
-
- ~NBDServer()
- {
- stop();
- }
};
std::ostream &operator<<(std::ostream &os, const NBDServer::IOContext &ctx) {
unregister_async_signal_handler(SIGINT, handle_signal);
unregister_async_signal_handler(SIGTERM, handle_signal);
shutdown_async_signal_handler();
-
- server.stop();
}
r = image.update_unwatch(handle);