[asterisk-commits] igorg: trunk r377595 - /trunk/channels/chan_unistim.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Dec 10 01:03:52 CST 2012
Author: igorg
Date: Mon Dec 10 01:03:48 2012
New Revision: 377595
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=377595
Log:
Add firmware information to CLI devices listing
Modified:
trunk/channels/chan_unistim.c
Modified: trunk/channels/chan_unistim.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_unistim.c?view=diff&rev=377595&r1=377594&r2=377595
==============================================================================
--- trunk/channels/chan_unistim.c (original)
+++ trunk/channels/chan_unistim.c Mon Dec 10 01:03:48 2012
@@ -446,6 +446,7 @@
int size_buff_entry; /*!< size of the buffer used to enter datas */
char buff_entry[16]; /*!< Buffer for temporary datas */
char macaddr[18]; /*!< mac adress of the phone (not always available) */
+ char firmware[8]; /*!< firmware of the phone (not always available) */
struct wsabuf wsabufsend[MAX_BUF_NUMBER]; /*!< Size of each paquet stored in the buffer array & pointer to this buffer */
unsigned char buf[MAX_BUF_NUMBER][MAX_BUF_SIZE]; /*!< Buffer array used to keep the lastest non-acked paquets */
struct unistim_device *device;
@@ -4320,6 +4321,7 @@
if (unistimdebug) {
ast_verb(0, "Got the firmware version : '%s'\n", buf + 13);
}
+ ast_copy_string(pte->firmware, (char *) (buf + 13), sizeof(pte->firmware));
init_phone_step2(pte);
return;
}
@@ -5932,12 +5934,13 @@
if (a->argc != e->args)
return CLI_SHOWUSAGE;
- ast_cli(a->fd, "%-20.20s %-20.20s %-15.15s %s\n", "Name/username", "MAC", "Host", "Status");
+ ast_cli(a->fd, "%-20.20s %-20.20s %-15.15s %-15.15s %s\n", "Name/username", "MAC", "Host", "Firmware", "Status");
ast_mutex_lock(&devicelock);
while (device) {
- ast_cli(a->fd, "%-20.20s %-20.20s %-15.15s %s\n",
+ ast_cli(a->fd, "%-20.20s %-20.20s %-15.15s %-15.15s %s\n",
device->name, device->id,
(!device->session) ? "(Unspecified)" : ast_inet_ntoa(device->session->sin.sin_addr),
+ (!device->session) ? "(Unspecified)" : device->session->firmware,
(!device->session) ? "UNKNOWN" : "OK");
device = device->next;
}
More information about the asterisk-commits
mailing list