summaryrefslogtreecommitdiff
path: root/src/nslcd_proto
diff options
context:
space:
mode:
Diffstat (limited to 'src/nslcd_proto')
-rwxr-xr-xsrc/nslcd_proto/func_handlerequest.go.sh1
-rw-r--r--src/nslcd_proto/io.go4
2 files changed, 3 insertions, 2 deletions
diff --git a/src/nslcd_proto/func_handlerequest.go.sh b/src/nslcd_proto/func_handlerequest.go.sh
index 185db73..62ef231 100755
--- a/src/nslcd_proto/func_handlerequest.go.sh
+++ b/src/nslcd_proto/func_handlerequest.go.sh
@@ -30,6 +30,7 @@ while read -r request; do
case NSLCD_ACTION_${request^^}:
var req Request_${request}
read(in, &req)
+ fmt.Printf("request: %#v\n", req)
res = backend.${request}(cred, req)
EOT
done < "$requests"
diff --git a/src/nslcd_proto/io.go b/src/nslcd_proto/io.go
index 321a87c..87783ac 100644
--- a/src/nslcd_proto/io.go
+++ b/src/nslcd_proto/io.go
@@ -70,7 +70,7 @@ func write(fd io.Writer, data interface{}) {
write(fd, v.Field(i).Interface())
}
default:
- panic("Invalid structure for NSLCD protocol data")
+ panic(fmt.Sprintf("Invalid structure to write NSLCD protocol data from: %T ( %#v )", data, data))
}
}
}
@@ -139,7 +139,7 @@ func read(fd io.Reader, data interface{}) {
read(fd, v.Field(i).Interface())
}
default:
- panic("Invalid structure for NSLCD protocol data")
+ panic(fmt.Sprintf("The argument to nslcd_proto.read() must be a pointer: %T ( %#v )", data, data))
}
}
}