[svn-commits] russell: branch group/chan_unistim r88161 - /team/group/chan_unistim/channels/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Nov 1 15:57:20 CDT 2007


Author: russell
Date: Thu Nov  1 15:57:20 2007
New Revision: 88161

URL: http://svn.digium.com/view/asterisk?view=rev&rev=88161
Log:
change capitalization style, doxygenify comments

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=88161&r1=88160&r2=88161
==============================================================================
--- team/group/chan_unistim/channels/chan_unistim.c (original)
+++ team/group/chan_unistim/channels/chan_unistim.c Thu Nov  1 15:57:20 2007
@@ -236,7 +236,7 @@
 /*! Protect the device list */
 AST_MUTEX_DEFINE_STATIC(devicelock);
 
-enum PhoneState {
+enum phone_state {
 	STATE_INIT,
 	STATE_AUTHDENY,
 	STATE_MAINPAGE,
@@ -249,12 +249,12 @@
 	STATE_HISTORY
 };
 
-enum HandsetState {
+enum handset_state {
 	STATE_ONHOOK,
 	STATE_OFFHOOK,
 };
 
-enum PhoneKey {
+enum phone_key {
 	KEY_0 = 0x40,
 	KEY_1 = 0x41,
 	KEY_2 = 0x42,
@@ -341,22 +341,26 @@
 } WSABUF, *LPWSABUF;
 
 typedef struct _SYSTEMTIME {
-	unsigned short wYear;
-	unsigned short wMonth;
-	unsigned short wDayOfWeek;
-	unsigned short wDay;
-	unsigned short wHour;
-	unsigned short wMinute;
-	unsigned short wSecond;
-	unsigned short wMilliseconds;
+	unsigned short w_year;
+	unsigned short w_month;
+	unsigned short w_day_of_week;
+	unsigned short w_day;
+	unsigned short w_hour;
+	unsigned short w_minute;
+	unsigned short w_second;
+	unsigned short w_milliseconds;
 } SYSTEMTIME;
 
 struct unistim_subchannel {
 	ast_mutex_t lock;
-	unsigned int subtype;	   /* SUBS_REAL or SUBS_THREEWAY */
-	struct ast_channel *owner;      /* Asterisk channel used by the subchannel */
-	struct unistim_line *parent;    /* Unistim line */
-	struct ast_rtp *rtp;	    /* RTP Handle */
+	/*! SUBS_REAL or SUBS_THREEWAY */
+	unsigned int subtype;
+	/*! Asterisk channel used by the subchannel */
+	struct ast_channel *owner;
+	/*! Unistim line */
+	struct unistim_line *parent;
+	/*! RTP handle */
+	struct ast_rtp *rtp;
 	int alreadygone;
 	char ringvolume;
 	char ringstyle;
@@ -447,7 +451,7 @@
 	unsigned long tick_next_ping;   /* time for the next ping */
 	int last_buf_available;	 /* number of a free slot */
 	int nb_retransmit;		      /* number of retransmition */
-	int state;				      /* state of the phone (see PhoneState) */
+	int state;				      /* state of the phone (see phone_state) */
 	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) */
@@ -705,14 +709,14 @@
 		DisplayLastError("Error in localtime()");
 		return;
 	}
-	systime->wYear = stm->tm_year;
-	systime->wMonth = stm->tm_mon + 1;
-	systime->wDayOfWeek = stm->tm_wday;
-	systime->wDay = stm->tm_mday;
-	systime->wHour = stm->tm_hour;
-	systime->wMinute = stm->tm_min;
-	systime->wSecond = stm->tm_sec;
-	systime->wMilliseconds = 0;
+	systime->w_year = stm->tm_year;
+	systime->w_month = stm->tm_mon + 1;
+	systime->w_day_of_week = stm->tm_wday;
+	systime->w_day = stm->tm_mday;
+	systime->w_hour = stm->tm_hour;
+	systime->w_minute = stm->tm_min;
+	systime->w_second = stm->tm_sec;
+	systime->w_milliseconds = 0;
 	return;
 }
 
@@ -1376,18 +1380,18 @@
 {
 	BUFFSEND;
 	SYSTEMTIME systime;
-	systime.wYear = systime.wMonth = systime.wDayOfWeek = 0;
-	systime.wDay = systime.wHour = systime.wMinute = 0;
-	systime.wSecond = systime.wMilliseconds = 0;
+	systime.w_year = systime.w_month = systime.w_day_of_week = 0;
+	systime.w_day = systime.w_hour = systime.w_minute = 0;
+	systime.w_second = systime.w_milliseconds = 0;
 
 	if (unistimdebug)
 		ast_verbose("Sending Time & Date\n");
 	memcpy(buffsend + SIZE_HEADER, PacketSendDateTime, sizeof(PacketSendDateTime));
 	GetLocalTime(&systime);
-	buffsend[10] = (unsigned char) systime.wMonth;
-	buffsend[11] = (unsigned char) systime.wDay;
-	buffsend[12] = (unsigned char) systime.wHour;
-	buffsend[13] = (unsigned char) systime.wMinute;
+	buffsend[10] = (unsigned char) systime.w_month;
+	buffsend[11] = (unsigned char) systime.w_day;
+	buffsend[12] = (unsigned char) systime.w_hour;
+	buffsend[13] = (unsigned char) systime.w_minute;
 	SendClient(SIZE_HEADER + sizeof(PacketSendDateTime), buffsend, pte);
 }
 
@@ -1395,9 +1399,9 @@
 {
 	BUFFSEND;
 	SYSTEMTIME systime;
-	systime.wYear = systime.wMonth = systime.wDayOfWeek = 0;
-	systime.wDay = systime.wHour = systime.wMinute = 0;
-	systime.wSecond = systime.wMilliseconds = 0;
+	systime.w_year = systime.w_month = systime.w_day_of_week = 0;
+	systime.w_day = systime.w_hour = systime.w_minute = 0;
+	systime.w_second = systime.w_milliseconds = 0;
 
 	if (unistimdebug)
 		ast_verbose("Sending Time & Date #2\n");
@@ -1407,10 +1411,10 @@
 		buffsend[9] = pte->device->datetimeformat;
 	else
 		buffsend[9] = 61;
-	buffsend[14] = (unsigned char) systime.wMonth;
-	buffsend[15] = (unsigned char) systime.wDay;
-	buffsend[16] = (unsigned char) systime.wHour;
-	buffsend[17] = (unsigned char) systime.wMinute;
+	buffsend[14] = (unsigned char) systime.w_month;
+	buffsend[15] = (unsigned char) systime.w_day;
+	buffsend[16] = (unsigned char) systime.w_hour;
+	buffsend[17] = (unsigned char) systime.w_minute;
 	SendClient(SIZE_HEADER + sizeof(PacketSendDateTime2), buffsend, pte);
 }
 
@@ -1418,18 +1422,18 @@
 {
 	BUFFSEND;
 	SYSTEMTIME systime;
-	systime.wYear = systime.wMonth = systime.wDayOfWeek = 0;
-	systime.wDay = systime.wHour = systime.wMinute = 0;
-	systime.wSecond = systime.wMilliseconds = 0;
+	systime.w_year = systime.w_month = systime.w_day_of_week = 0;
+	systime.w_day = systime.w_hour = systime.w_minute = 0;
+	systime.w_second = systime.w_milliseconds = 0;
 
 	if (unistimdebug)
 		ast_verbose("Sending Time & Date #3\n");
 	memcpy(buffsend + SIZE_HEADER, PacketSendDateTime3, sizeof(PacketSendDateTime3));
 	GetLocalTime(&systime);
-	buffsend[10] = (unsigned char) systime.wMonth;
-	buffsend[11] = (unsigned char) systime.wDay;
-	buffsend[12] = (unsigned char) systime.wHour;
-	buffsend[13] = (unsigned char) systime.wMinute;
+	buffsend[10] = (unsigned char) systime.w_month;
+	buffsend[11] = (unsigned char) systime.w_day;
+	buffsend[12] = (unsigned char) systime.w_hour;
+	buffsend[13] = (unsigned char) systime.w_minute;
 	SendClient(SIZE_HEADER + sizeof(PacketSendDateTime3), buffsend, pte);
 }
 
@@ -1713,9 +1717,9 @@
 	int size;
 	FILE *f, *f2;
 	SYSTEMTIME systime;
-	systime.wYear = systime.wMonth = systime.wDayOfWeek = 0;
-	systime.wDay = systime.wHour = systime.wMinute = 0;
-	systime.wSecond = systime.wMilliseconds = 0;
+	systime.w_year = systime.w_month = systime.w_day_of_week = 0;
+	systime.w_day = systime.w_hour = systime.w_minute = 0;
+	systime.w_second = systime.w_milliseconds = 0;
 	if (!pte->device)
 		return -1;
 	if (!pte->device->callhistory)
@@ -1741,8 +1745,8 @@
 	} else
 		strcpy(tmp2, "Answ");
 	snprintf(line1, sizeof(line1), "%04d/%02d/%02d %02d:%02d:%02d %s",
-			 systime.wYear + 1900, systime.wMonth, systime.wDay, systime.wHour,
-			 systime.wMinute, systime.wSecond, tmp2);
+			 systime.w_year + 1900, systime.w_month, systime.w_day, systime.w_hour,
+			 systime.w_minute, systime.w_second, tmp2);
 	snprintf(tmp, sizeof(tmp), "%s/%s/%s-%c.csv", (char *) ast_config_AST_LOG_DIR,
 			 USTM_LOG_DIR, pte->device->name, way);
 	f = fopen(tmp, "r");




More information about the svn-commits mailing list