Use a better name.

geesefs-0-30-9
Aaron Jacobs 2015-05-05 09:59:14 +10:00
parent 54b3ccc86a
commit e6656ea87f
1 changed files with 7 additions and 7 deletions

View File

@ -53,7 +53,7 @@ type commonOp struct {
// A function that is invoked with the error given to Respond, for use in
// closing off traces and reporting back to the connection.
finish func(error)
finished func(error)
}
var gPIDMapMu sync.Mutex
@ -156,13 +156,13 @@ func (o *commonOp) init(
op Op,
bazilReq bazilfuse.Request,
log func(int, string, ...interface{}),
finish func(error)) {
finished func(error)) {
// Initialize basic fields.
o.ctx = ctx
o.op = op
o.bazilReq = bazilReq
o.log = log
o.finish = finish
o.finished = finished
// Set up a context that reflects per-PID tracing if appropriate.
o.ctx = o.maybeTraceByPID(o.ctx, int(bazilReq.Hdr().Pid))
@ -172,8 +172,8 @@ func (o *commonOp) init(
o.ctx, reportForTrace = reqtrace.StartSpan(ctx, o.op.ShortDesc())
// When the op is finished, report to both reqtrace and the connection.
prevFinish := o.finish
o.finish = func(err error) {
prevFinish := o.finished
o.finished = func(err error) {
reportForTrace(err)
prevFinish(err)
}
@ -210,7 +210,7 @@ func (o *commonOp) respondErr(err error) {
o.bazilReq.RespondError(err)
// Report back to the connection that we are finished.
o.finish(err)
o.finished(err)
}
// Respond with the supplied response struct, which must be accepted by a
@ -234,5 +234,5 @@ func (o *commonOp) respond(resp interface{}) {
respond.Call([]reflect.Value{reflect.ValueOf(resp)})
// Report back to the connection that we are finished.
o.finish(nil)
o.finished(nil)
}