Commit f0f4fcde authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent f8526f45
......@@ -88,6 +88,7 @@ struct WatchLink {
// SrvReq represents 1 server-initiated wcfs request received over /head/watch link.
struct SrvReq {
// XXX
Oid foid; // request is about this file
};
......@@ -135,5 +136,16 @@ void Conn::_pinner(IContext *ctx) {
void Conn::_pin1(SrvReq *req) {
Conn *wconn = this;
// XXX
// XXX defer: reply either ack or nak on error
wconn->_filemu.lock();
auto _ = wconn->_filetab.find(req->foid);
if (_ == wconn->_filetab.end()) {
// XXX unlock
// XXX err = we are not watching the file - why wcfs sent us this update?
}
_File *f = _->second;
wconn->_filemu.unlock();
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment