Summary:ASTERISK-12147: [patch] CLI command "dnsmgr refresh" not registered
Reporter:David Chappell (chappell)Labels:
Date Opened:2008-06-05 09:29:24Date Closed:2008-07-14 12:02:52
Versions:Frequency of
Environment:Attachments:( 0) dnsmgr_refresh_2.diff
( 1) dnsmgr_refresh_3.diff
( 2) dnsmgr_refresh.diff
Description:main/dnsmgr.c contains an implementation of an inaccessible CLI command


In main/dnsmgr.c dnsmgr_init() fails to register the "dnsmgr refresh" command with the CLI dispatcher.
Comments:By: Russell Bryant (russell) 2008-06-05 10:20:23

I'm not sure that this patch is valid.  This CLI command does get registered if the dnsmgr is enabled.  See the do_reload() function.

By: David Chappell (chappell) 2008-06-05 13:46:17

I looks like you are correct.  I discovered this 'bug' while first experimenting with the DNS manager.  I must have had it disabled when I noticed that the "dnsmgr refresh" command was missing.

Frankly, I think that the way this command appears and disappears, though clever, is needlessly confusing.  But it is probably not worth lobbying to have it 'fixed'.

I have attached a new patch which adds a comment indicating that the omission is intentional.

By: Russell Bryant (russell) 2008-06-18 07:24:52

I think you're right about it being confusing.  If you'd like to make it registered always, I'd be ok with that.  If you do, please also update the CLI command implementation to notice when it is not enabled to say that when you run it instead of actually trying to do a refresh.

By: David Chappell (chappell) 2008-07-03 10:25:34

OK, that is what I will do.  I have uploaded dnsmgr_refresh_3.diff.  This patch disables "dnsmgr refresh" when dnsmgr is disabled rather than making it disappear.

By: Michiel van Baak (mvanbaak) 2008-07-13 16:05:41


Thank you.


you agree ?

Works for me.

By: Michiel van Baak (mvanbaak) 2008-07-13 17:00:06

tested on 1.4 svn on OpenBSD and Debian stable and Ubuntu 8.04
Works like a charm

By: Russell Bryant (russell) 2008-07-14 09:33:15

Looks good to me

By: Michiel van Baak (mvanbaak) 2008-07-14 09:50:51

I'll commit it later today when I'm back home.

By: Digium Subversion (svnbot) 2008-07-14 12:02:43

Repository: asterisk
Revision: 130735

U   branches/1.4/main/dnsmgr.c

r130735 | mvanbaak | 2008-07-14 12:02:36 -0500 (Mon, 14 Jul 2008) | 10 lines

notify the user that dnsmgr refresh wont work when dnsmgr is not enabled.
Previously this command would automagically appear and disappear.
This was confusing.

(closes issue ASTERISK-12147)
Reported by: chappell
     dnsmgr_refresh_3.diff uploaded by chappell (license 8)
Tested by: russell, chappell, mvanbaak