[asterisk-commits] russell: branch group/chan_unistim r88160 - /team/group/chan_unistim/channels/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Nov 1 15:52:26 CDT 2007
Author: russell
Date: Thu Nov 1 15:52:25 2007
New Revision: 88160
URL: http://svn.digium.com/view/asterisk?view=rev&rev=88160
Log:
* Use standard copyright header
* doxygenify comments
* replace custom MAXINT with standard UINT_MAX
Modified:
team/group/chan_unistim/channels/chan_unistim.c
Modified: team/group/chan_unistim/channels/chan_unistim.c
URL: http://svn.digium.com/view/asterisk/team/group/chan_unistim/channels/chan_unistim.c?view=diff&rev=88160&r1=88159&r2=88160
==============================================================================
--- team/group/chan_unistim/channels/chan_unistim.c (original)
+++ team/group/chan_unistim/channels/chan_unistim.c Thu Nov 1 15:52:25 2007
@@ -14,20 +14,10 @@
* any of the maintainers of this project for assistance;
* the project provides a web site, mailing lists and IRC
* channels for your use.
- *
+ *
* This program is free software, distributed under the terms of
* the GNU General Public License Version 2. See the LICENSE file
* at the top of the source tree.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
*/
/*!
@@ -92,11 +82,11 @@
#include "asterisk/stringfields.h"
#include "asterisk/abstract_jb.h"
-/* IP_PKTINFO is not portable. It's used to retrieve our IP.
+/*! IP_PKTINFO is not portable. It's used to retrieve our IP.
Comment the next line if your running *BSD */
#define HAVE_PKTINFO 1
-/* Beware, G729 and G723 are not supported by asterisk, except with the proper licence */
+/*! Beware, G729 and G723 are not supported by asterisk, except with the proper licence */
#define CAPABILITY AST_FORMAT_ALAW | AST_FORMAT_ULAW /* | AST_FORMAT_G729A | AST_FORMAT_G723_1 */
#define DEFAULTCONTEXT "default"
@@ -104,15 +94,21 @@
#define DEFAULTCALLERNAME " "
#define USTM_LOG_DIR "unistimHistory"
-#define MAX_BUF_SIZE 64 /* Size of the transmit buffer */
-#define MAX_BUF_NUMBER 50 /* Number of slots for the transmit queue */
-#define NB_MAX_RETRANSMIT 8 /* Try x times before removing the phone */
-#define IDLE_WAIT 1000 /* Nb of milliseconds waited when no events are scheduled */
-#define RETRANSMIT_TIMER 2000 /* Wait x milliseconds before resending a packet */
-#define TIMER_MWI 10000 /* How often the mailbox is checked for new messages */
-#define DEFAULT_CODEC 0x00 /* Not used */
+/*! Size of the transmit buffer */
+#define MAX_BUF_SIZE 64
+/*! Number of slots for the transmit queue */
+#define MAX_BUF_NUMBER 50
+/*! Try x times before removing the phone */
+#define NB_MAX_RETRANSMIT 8
+/*! Nb of milliseconds waited when no events are scheduled */
+#define IDLE_WAIT 1000
+/*! Wait x milliseconds before resending a packet */
+#define RETRANSMIT_TIMER 2000
+/*! How often the mailbox is checked for new messages */
+#define TIMER_MWI 10000
+/*! Not used */
+#define DEFAULT_CODEC 0x00
#define SIZE_PAGE 4096
-#define MAXINT (unsigned int)(-1)
#define DEVICE_NAME_LEN 16
#define AST_CONFIG_MAX_PATH 255
#define MAX_ENTRY_LOG 30
@@ -129,10 +125,14 @@
};
enum autoprov_extn {
- EXTENSION_NONE = 0, /* Do not create an extension into the default dialplan */
- EXTENSION_ASK, /* Prompt user for an extension number and register it */
- EXTENSION_LINE, /* Register an extension with the line=> value */
- EXTENSION_TN /* Used with AUTOPROVISIONING_TN */
+ /*! Do not create an extension into the default dialplan */
+ EXTENSION_NONE = 0,
+ /*! Prompt user for an extension number and register it */
+ EXTENSION_ASK,
+ /*! Register an extension with the line=> value */
+ EXTENSION_LINE,
+ /*! Used with AUTOPROVISIONING_TN */
+ EXTENSION_TN
};
#define OUTPUT_HANDSET 0xC0
#define OUTPUT_HEADPHONE 0xC1
@@ -205,7 +205,7 @@
/* #define DEBUG_TIMER ast_verbose */
#define DEBUG_TIMER dummy
-static int unistimdebug = 0; /* Enable verbose output. can also be set with the CLI */
+static int unistimdebug = 0; /*!< Enable verbose output. can also be set with the CLI */
static int unistim_reload(int fd, int argc, char *argv[]);
static int unistim_port;
static enum autoprovision autoprovisioning = AUTOPROVISIONING_NO;
@@ -214,26 +214,26 @@
static struct io_context *io;
static struct sched_context *sched;
static struct sockaddr_in public_ip = { 0, };
-static struct sockaddr_in addr_from; /* give the IP address for the last packet received */
-static unsigned int size_addr_from = sizeof(addr_from); /* size of the sockaddr_in (in WSARecvFrom) */
-static unsigned char *buff; /* Receive buffer address */
-static unsigned char flag = 0; /* Used for test */
+static struct sockaddr_in addr_from; /*!< give the IP address for the last packet received */
+static unsigned int size_addr_from = sizeof(addr_from); /*!< size of the sockaddr_in (in WSARecvFrom) */
+static unsigned char *buff; /*!< Receive buffer address */
+static unsigned char flag = 0; /*!< Used for test */
static int unistim_reloading = 0;
AST_MUTEX_DEFINE_STATIC(unistim_reload_lock);
AST_MUTEX_DEFINE_STATIC(usecnt_lock);
static int usecnt = 0;
/* extern char ast_config_AST_LOG_DIR[AST_CONFIG_MAX_PATH]; */
-/* This is the thread for the monitor which checks for input on the channels
+/*! This is the thread for the monitor which checks for input on the channels
* which are not currently in use. */
static pthread_t monitor_thread = AST_PTHREADT_NULL;
-/* Protect the monitoring thread, so only one process can kill or start it, and not
+/*! Protect the monitoring thread, so only one process can kill or start it, and not
* when it's doing something critical. */
AST_MUTEX_DEFINE_STATIC(monlock);
-/* Protect the session list */
+/*! Protect the session list */
AST_MUTEX_DEFINE_STATIC(sessionlock);
-/* Protect the device list */
+/*! Protect the device list */
AST_MUTEX_DEFINE_STATIC(devicelock);
enum PhoneState {
@@ -4485,7 +4485,7 @@
/* This loop is executed at least every IDLE_WAITus (1s) or every time a packet is received */
/* Looking for the smallest time-out value */
tick = GetTickCount();
- dwTimeOut = MAXINT;
+ dwTimeOut = UINT_MAX;
ast_mutex_lock(&sessionlock);
cur = sessions;
DEBUG_TIMER("checking timeout for session %p with tick = %u\n", cur, tick);
@@ -4502,7 +4502,7 @@
if (SendRetransmit(cur)) {
DEBUG_TIMER("The chained link was modified, restarting...\n");
cur = sessions;
- dwTimeOut = MAXINT;
+ dwTimeOut = UINT_MAX;
continue;
}
}
More information about the asterisk-commits
mailing list