Commit graph

14 commits

Author SHA1 Message Date
steve-lad 22d845ced3 Initialise all chan_sccp defaults in sccp_settings
Get default system settings from chan_sccp and add to sccpsettings
Remove legacy settings from sccpsettings
Change tftpReadTestFile to accept host as argument
Change sccpsettings structure to include systemdefaults
2021-06-28 11:51:05 +02:00
steve-lad f882a66eb4 Tighten TFTP read controls
Avoid hanging if no data received by setting timeout. Thanks to @dkgroot  for soulution
2021-06-28 07:17:51 +02:00
steve-lad f74978c1b3 Add timer on TFTP read; Get Metadata
TFTP read caused a hang if no server available

Set to DONTWAIT and loop and then check for valid data

Use metadat to set system defaults
2021-06-27 17:12:10 +02:00
steve-lad 4fcf16b317
Do not die on SQL warning
If we change a field from VARCHAR to enum, we will get warnings as possibly truncating data. Accept this and carry on.

Only fail on an error.
2021-06-27 11:06:33 +02:00
dkgroot 4da4f391d6 Fixes based on review by @steve-lad 2021-06-27 07:54:00 +00:00
dkgroot 838ff633aa Reverse the logic when detecting tftpserver existence and path
- write a sentinel probe file to the known/possible distro tftp directories
 - try fetching it through tftp
 - if we manage to fetch the file, we have the correct path
 - remove sentinel probe file

When creating directories in tftpboot directory we should not set write permissions, using 0755 instead.
2021-06-26 23:19:53 +00:00
steve-lad 852156878d Simplify method name 2021-06-24 15:40:36 +02:00
steve-lad ff1c451fe1 Update Installer and Sccp_manager Construct
Move initial defaults reading from Construct to Install
Move initVarFromXml to helper functions - no longer used as defaults should come from db
Remove extraneous initialisations from Sccp_manager - these are now handled in Installer
Save TFTP structure to sccpsettings in Installer
Pass tftp_root to extconfigs ( if changed or uninitialised, was not written back to settingsFromDb before being passed to extconfigs
2021-06-24 10:02:26 +02:00
steve-lad d7e196cf21 Clean up installer and partially revert externconfigs
Remove ancillary function to traits
Move tftp directory management back to extern configs
Remove call to extern configs from InitialiseSccpPath and so from Construct
Need to add call to updateTftpStructure when settings changed ---WIP ---
2021-06-23 17:03:24 +02:00
steve-lad c271dbf3c2 Update edit device to apply current schema
Add defaults if they are unset for the device
If device fields are now an enum, make sure that legacy values are valid or replace with defaults
2021-06-20 16:25:44 +02:00
steve-lad 57bc13f782 Modify default values
Change sccpgeneral to remove inherit - now inherit default values automatically
Add default values to form groups
Revert changes informShow
Update getTableDefaults to better manage underscores with chan-sccp
Change Defaults in Install
2021-06-18 11:58:00 +02:00
steve-lad efdf2d0469 Added sccpline fields
WIP Still have issue with def_modify in installer
2021-06-17 18:39:32 +02:00
steve-lad 416cedc425 Create new function to get device defaults
Add new function in helperFunctions and use
2021-06-17 10:18:07 +02:00
steve-lad 4ee26a9871 Name Changes 2021-06-02 15:03:38 +02:00
Renamed from SccpManTraits/helperfunctions.php (Browse further)