[asterisk-commits] russell: branch russell/chan_refcount r100550 - in /team/russell/chan_refcoun...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jan 28 08:11:13 CST 2008


Author: russell
Date: Mon Jan 28 08:11:12 2008
New Revision: 100550

URL: http://svn.digium.com/view/asterisk?view=rev&rev=100550
Log:
resolve, reset

Modified:
    team/russell/chan_refcount/   (props changed)
    team/russell/chan_refcount/channels/chan_sip.c
    team/russell/chan_refcount/main/channel.c

Propchange: team/russell/chan_refcount/
------------------------------------------------------------------------------
    automerge = yesplzkthxbye

Propchange: team/russell/chan_refcount/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Jan 28 08:11:12 2008
@@ -1,1 +1,1 @@
-/trunk:1-100529
+/trunk:1-100549

Modified: team/russell/chan_refcount/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/channels/chan_sip.c?view=diff&rev=100550&r1=100549&r2=100550
==============================================================================
--- team/russell/chan_refcount/channels/chan_sip.c (original)
+++ team/russell/chan_refcount/channels/chan_sip.c Mon Jan 28 08:11:12 2008
@@ -17764,7 +17764,7 @@
 	req.socket.fd 	= sipsock;
 	req.socket.type = SIP_TRANSPORT_UDP;
 	req.socket.ser	= NULL;
-	req.socket.port = htons(bindaddr.sin_port);
+	req.socket.port = bindaddr.sin_port;
 	req.socket.lock = NULL;
 
 	handle_request_do(&req, &sin);

Modified: team/russell/chan_refcount/main/channel.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/main/channel.c?view=diff&rev=100550&r1=100549&r2=100550
==============================================================================
--- team/russell/chan_refcount/main/channel.c (original)
+++ team/russell/chan_refcount/main/channel.c Mon Jan 28 08:11:12 2008
@@ -489,7 +489,7 @@
 {
 	int x;
 
-	for (x=0; x < sizeof(causes) / sizeof(causes[0]); x++) {
+	for (x = 0; x < ARRAY_LEN(causes); x++) {
 		if (causes[x].cause == cause)
 			return causes[x].desc;
 	}
@@ -502,8 +502,8 @@
 {
 	int x;
 
-	for (x = 0; x < sizeof(causes) / sizeof(causes[0]); x++)
-		if (strncasecmp(causes[x].name, name, strlen(causes[x].name)) == 0)
+	for (x = 0; x < ARRAY_LEN(causes); x++)
+		if (!strncasecmp(causes[x].name, name, strlen(causes[x].name)))
 			return causes[x].cause;
 
 	return -1;
@@ -4586,14 +4586,14 @@
 	channels = ao2_container_alloc(MAX_CHANNEL_BUCKETS,
 		ast_channel_hash_cb, ast_channel_cmp_cb);
 
-	ast_cli_register_multiple(cli_channel, sizeof(cli_channel) / sizeof(struct ast_cli_entry));
+	ast_cli_register_multiple(cli_channel, ARRAY_LEN(cli_channel));
 }
 
 /*! \brief Print call group and pickup group ---*/
 char *ast_print_group(char *buf, int buflen, ast_group_t group)
 {
 	unsigned int i;
-	int first=1;
+	int first = 1;
 	char num[3];
 
 	buf[0] = '\0';
@@ -4606,7 +4606,7 @@
 	   		if (!first) {
 				strncat(buf, ", ", buflen);
 			} else {
-				first=0;
+				first = 0;
 	  		}
 			snprintf(num, sizeof(num), "%u", i);
 			strncat(buf, num, buflen);
@@ -4644,9 +4644,12 @@
 		.samples = samples,
 		.datalen = sizeof(buf),
 	};
+
 	memset(buf, 0, sizeof(buf));
+
 	if (ast_write(chan, &frame))
 		return -1;
+
 	return 0;
 }
 
@@ -4728,44 +4731,45 @@
 int ast_say_number(struct ast_channel *chan, int num,
 	const char *ints, const char *language, const char *options)
 {
-        return ast_say_number_full(chan, num, ints, language, options, -1, -1);
+	return ast_say_number_full(chan, num, ints, language, options, -1, -1);
 }
 
 int ast_say_enumeration(struct ast_channel *chan, int num,
 	const char *ints, const char *language, const char *options)
 {
-        return ast_say_enumeration_full(chan, num, ints, language, options, -1, -1);
+	return ast_say_enumeration_full(chan, num, ints, language, options, -1, -1);
 }
 
 int ast_say_digits(struct ast_channel *chan, int num,
 	const char *ints, const char *lang)
 {
-        return ast_say_digits_full(chan, num, ints, lang, -1, -1);
+	return ast_say_digits_full(chan, num, ints, lang, -1, -1);
 }
 
 int ast_say_digit_str(struct ast_channel *chan, const char *str,
 	const char *ints, const char *lang)
 {
-        return ast_say_digit_str_full(chan, str, ints, lang, -1, -1);
+	return ast_say_digit_str_full(chan, str, ints, lang, -1, -1);
 }
 
 int ast_say_character_str(struct ast_channel *chan, const char *str,
 	const char *ints, const char *lang)
 {
-        return ast_say_character_str_full(chan, str, ints, lang, -1, -1);
+	return ast_say_character_str_full(chan, str, ints, lang, -1, -1);
 }
 
 int ast_say_phonetic_str(struct ast_channel *chan, const char *str,
 	const char *ints, const char *lang)
 {
-        return ast_say_phonetic_str_full(chan, str, ints, lang, -1, -1);
+	return ast_say_phonetic_str_full(chan, str, ints, lang, -1, -1);
 }
 
 int ast_say_digits_full(struct ast_channel *chan, int num,
 	const char *ints, const char *lang, int audiofd, int ctrlfd)
 {
-        char buf[256];
-
-        snprintf(buf, sizeof(buf), "%d", num);
-        return ast_say_digit_str_full(chan, buf, ints, lang, audiofd, ctrlfd);
-}
+	char buf[256];
+
+	snprintf(buf, sizeof(buf), "%d", num);
+
+	return ast_say_digit_str_full(chan, buf, ints, lang, audiofd, ctrlfd);
+}




More information about the asterisk-commits mailing list