module-transaction: Add support for setting/getting module data
Module data is data associated with a module handle that is available for the whole module loading time so it can be used also during different operations. We use cgo handles to preserve the life of the go objects so any value can be associated with a pam transaction.
This commit is contained in:
@@ -55,8 +55,12 @@ func (m *integrationTesterModule) handleRequest(authReq *authRequest, r *Request
|
||||
}
|
||||
|
||||
var args []reflect.Value
|
||||
for _, arg := range r.ActionArgs {
|
||||
args = append(args, reflect.ValueOf(arg))
|
||||
for i, arg := range r.ActionArgs {
|
||||
if arg == nil {
|
||||
args = append(args, reflect.Zero(method.Type().In(i)))
|
||||
} else {
|
||||
args = append(args, reflect.ValueOf(arg))
|
||||
}
|
||||
}
|
||||
|
||||
res = &Result{Action: "return"}
|
||||
|
||||
Reference in New Issue
Block a user