param: Skip generating hooks for local and string parameters
authorAndrew Bartlett <abartlet@samba.org>
Mon, 14 Oct 2013 02:36:18 +0000 (15:36 +1300)
committerStefan Metzmacher <metze@samba.org>
Wed, 16 Oct 2013 07:29:54 +0000 (09:29 +0200)
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
script/mks3param.pl

index 4222ca57442ba0420454de215ba52f5a3247bfc6..799958c0b0d3f8bd8cd0d211bc7a9a14697d24f5 100644 (file)
@@ -108,7 +108,14 @@ sub handle_loadparm($$)
 {
        my ($file,$line) = @_;
 
-       if ($line =~ /^FN_(GLOBAL|LOCAL)_(CONST_STRING|STRING|BOOL|bool|CHAR|INTEGER|LIST)\((\w+),.*\)/o) {
+       # Local parameters don't need the ->s3_fns because the struct
+       # loadparm_service is shared and lpcfg_service() checks the ->s3_fns
+       # hook
+       #
+       # STRING isn't handled as we do not yet have a way to pass in a memory context nor
+       # do we have a good way of dealing with the % macros yet.
+
+       if ($line =~ /^FN_(GLOBAL)_(CONST_STRING|BOOL|bool|CHAR|INTEGER|LIST)\((\w+),.*\)/o) {
                my $scope = $1;
                my $type = $2;
                my $name = $3;