Idefisk
Tools
Tutorials
Reviews
VoIP Providers
Archives
AsteriskGuru Archives
Mailing List Archives
FAQ
Search
Memberlist
Usergroups
Register
Profile
Log in to check your private messages
Log in
[Asterisk-Dev] sip show registry fix
AsteriskGuru Archives Forum Index
->
Asterisk-Dev
View previous topic
::
View next topic
Author
Message
asterisk-dev at lists.dig
Guest
Posted: Fri Mar 21, 2003 6:10 am
Post subject: [Asterisk-Dev] sip show registry fix
--19701020
Content-Type: text/plain; charset=US-ASCII
Content-Disposition: inline
Fixes a formatting bug.
-- Luke
--19701020
Content-Type: text/plain; name="chan_sip.c.diff"; x-unix-mode=0644
Content-Disposition: attachment; filename="chan_sip.c.diff"
Index: channels/chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.4
diff -u -r1.4 chan_sip.c
--- channels/chan_sip.c 20 Mar 2003 22:01:53 -0000 1.4
+++ channels/chan_sip.c 21 Mar 2003 06:16:07 -0000
@@ -2825,20 +2825,18 @@
static int sip_show_registry(int fd, int argc, char *argv[])
{
-#define FORMAT2 "%-20.20s %-10.10s %-20.20s %8.8s %s\n"
-#define FORMAT "%-20.20s %-10.10s %-20.20s %8d %s\n"
+#define FORMAT2 "%-20.20s %-10.10s %8.8s %-20.20s\n"
+#define FORMAT "%-20.20s %-10.10s %8d %-20.20s\n"
struct sip_registry *reg;
char host[80];
- char state[20];
if (argc != 3)
return RESULT_SHOWUSAGE;
ast_pthread_mutex_lock(&peerl.lock);
ast_cli(fd, FORMAT2, "Host", "Username", "Refresh", "State");
for (reg = registrations;reg;reg = reg->next) {
snprintf(host, sizeof(host), "%s:%d", inet_ntoa(reg->addr.sin_addr), ntohs(reg->addr.sin_port));
- snprintf(state, sizeof(state), "%s", regstate2str(reg->regstate));
- ast_cli(fd, FORMAT, host,
- reg->username, state, reg->refresh, regstate2str(reg->regstate));
+ ast_cli(fd, FORMAT, host,
+ reg->username, reg->refresh, regstate2str(reg->regstate));
}
ast_pthread_mutex_unlock(&peerl.lock);
return RESULT_SUCCESS;
--19701020
Content-Type: text/plain; charset=US-ASCII
Content-Disposition: inline
--
Luke Howard | PADL Software Pty Ltd |
www.padl.com
--19701020--
Back to top
Display posts from previous:
All Posts
1 Day
7 Days
2 Weeks
1 Month
3 Months
6 Months
1 Year
Oldest First
Newest First
AsteriskGuru Archives Forum Index
->
Asterisk-Dev
All times are GMT
Page
1
of
1
Jump to:
Select a forum
Asterisk Mailing Lists
----------------
Asterisk-Users
Asterisk-Dev
Asterisk-CVS
Asterisk-Biz
Asterisk-Doc
Asterisk-BSD
Asterisk-Announce
Asterisk Call Centers
Asterisk-Video
Asterisk-Speech-Rec
Bristuff-Users
You
cannot
post new topics in this forum
You
cannot
reply to topics in this forum
You
cannot
edit your posts in this forum
You
cannot
delete your posts in this forum
You
cannot
vote in polls in this forum
Powered by
phpBB
© 2001, 2005 phpBB Group