param: handle P_BYTES in more places
authorAndrew Bartlett <abartlet@samba.org>
Sat, 21 Jan 2012 05:50:43 +0000 (16:50 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Sat, 21 Jan 2012 10:32:06 +0000 (11:32 +0100)
lib/param/loadparm.c
source3/web/swat.c

index 03ee8f34ac6bc82dee7e058a806999c8f1636e47..ef1e7d9e47ed41fe3c60fc4511abf3fbe702f226 100644 (file)
@@ -2099,6 +2099,7 @@ static void copy_service(struct loadparm_service *pserviceDest,
                                        break;
 
                                case P_INTEGER:
                                        break;
 
                                case P_INTEGER:
+                               case P_BYTES:
                                case P_OCTAL:
                                case P_ENUM:
                                        *(int *)dest_ptr = *(int *)src_ptr;
                                case P_OCTAL:
                                case P_ENUM:
                                        *(int *)dest_ptr = *(int *)src_ptr;
index 3d6aaf4ca7010028ef632f709f9cf69c73fce5ac..34974b400f1b59abc45b720313d277d645ef3ec2 100644 (file)
@@ -409,6 +409,7 @@ static void show_parameter(int snum, struct parm_struct *parm)
                break;
 
        case P_INTEGER:
                break;
 
        case P_INTEGER:
+       case P_BYTES:
                printf("<input type=text size=8 name=\"parm_%s\" value=\"%d\">", make_parm_name(parm->label), *(int *)ptr);
                printf("<input type=button value=\"%s\" onClick=\"swatform.parm_%s.value=\'%d\'\">",
                        _("Set Default"), make_parm_name(parm->label),(int)(parm->def.ivalue));
                printf("<input type=text size=8 name=\"parm_%s\" value=\"%d\">", make_parm_name(parm->label), *(int *)ptr);
                printf("<input type=button value=\"%s\" onClick=\"swatform.parm_%s.value=\'%d\'\">",
                        _("Set Default"), make_parm_name(parm->label),(int)(parm->def.ivalue));
@@ -499,6 +500,7 @@ static void show_parameters(int snum, int allparameters, unsigned int parm_filte
                                        break;
 
                                case P_INTEGER:
                                        break;
 
                                case P_INTEGER:
+                               case P_BYTES:
                                case P_OCTAL:
                                        if (*(int *)ptr == (int)(parm->def.ivalue)) continue;
                                        break;
                                case P_OCTAL:
                                        if (*(int *)ptr == (int)(parm->def.ivalue)) continue;
                                        break;