[asterisk-commits] seanbright: branch seanbright/resolve-shadow-warnings r137030 - in /team/sean...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Aug 9 19:58:12 CDT 2008


Author: seanbright
Date: Sat Aug  9 19:58:11 2008
New Revision: 137030

URL: http://svn.digium.com/view/asterisk?view=rev&rev=137030
Log:
Merged revisions 136947,137028 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r136947 | tilghman | 2008-08-09 11:26:27 -0400 (Sat, 09 Aug 2008) | 18 lines

Merged revisions 136946 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r136946 | tilghman | 2008-08-09 10:25:36 -0500 (Sat, 09 Aug 2008) | 10 lines

Merged revisions 136945 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r136945 | tilghman | 2008-08-09 10:24:36 -0500 (Sat, 09 Aug 2008) | 2 lines

Regression fixes for Solaris

........

................

................
r137028 | seanbright | 2008-08-09 20:47:56 -0400 (Sat, 09 Aug 2008) | 1 line

All of the res/ stuff (other than res_jabber) from the RSW branch.
................

Modified:
    team/seanbright/resolve-shadow-warnings/   (props changed)
    team/seanbright/resolve-shadow-warnings/include/asterisk/astobj2.h
    team/seanbright/resolve-shadow-warnings/include/asterisk/compat.h
    team/seanbright/resolve-shadow-warnings/res/res_config_pgsql.c
    team/seanbright/resolve-shadow-warnings/res/res_musiconhold.c

Propchange: team/seanbright/resolve-shadow-warnings/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Propchange: team/seanbright/resolve-shadow-warnings/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sat Aug  9 19:58:11 2008
@@ -1,1 +1,1 @@
-/trunk:1-136918
+/trunk:1-137029

Modified: team/seanbright/resolve-shadow-warnings/include/asterisk/astobj2.h
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/include/asterisk/astobj2.h?view=diff&rev=137030&r1=137029&r2=137030
==============================================================================
--- team/seanbright/resolve-shadow-warnings/include/asterisk/astobj2.h (original)
+++ team/seanbright/resolve-shadow-warnings/include/asterisk/astobj2.h Sat Aug  9 19:58:11 2008
@@ -16,6 +16,8 @@
 
 #ifndef _ASTERISK_ASTOBJ2_H
 #define _ASTERISK_ASTOBJ2_H
+
+#include "asterisk/compat.h"
 
 /*! \file 
  * \ref AstObj2

Modified: team/seanbright/resolve-shadow-warnings/include/asterisk/compat.h
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/include/asterisk/compat.h?view=diff&rev=137030&r1=137029&r2=137030
==============================================================================
--- team/seanbright/resolve-shadow-warnings/include/asterisk/compat.h (original)
+++ team/seanbright/resolve-shadow-warnings/include/asterisk/compat.h Sat Aug  9 19:58:11 2008
@@ -163,6 +163,7 @@
 typedef unsigned char	u_int8_t;
 typedef unsigned short	u_int16_t;
 typedef unsigned int	u_int32_t;
+typedef unsigned int	uint;
 #endif
 
 #endif /* SOLARIS */

Modified: team/seanbright/resolve-shadow-warnings/res/res_config_pgsql.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/res/res_config_pgsql.c?view=diff&rev=137030&r1=137029&r2=137030
==============================================================================
--- team/seanbright/resolve-shadow-warnings/res/res_config_pgsql.c (original)
+++ team/seanbright/resolve-shadow-warnings/res/res_config_pgsql.c Sat Aug  9 19:58:11 2008
@@ -988,7 +988,7 @@
 			} else {
 				struct ast_str *sql = ast_str_create(100);
 				char fieldtype[15];
-				PGresult *result;
+				PGresult *res;
 
 				if (requirements == RQ_CREATECHAR || type == RQ_CHAR) {
 					/* Size is minimum length; make it at least 50% greater,
@@ -1029,12 +1029,12 @@
 				}
 
 				ast_debug(1, "About to run ALTER query on table '%s' to add column '%s'\n", tablename, elm);
-				result = PQexec(pgsqlConn, sql->str);
+				res = PQexec(pgsqlConn, sql->str);
 				ast_debug(1, "Finished running ALTER query on table '%s'\n", tablename);
-				if (PQresultStatus(result) != PGRES_COMMAND_OK) {
+				if (PQresultStatus(res) != PGRES_COMMAND_OK) {
 					ast_log(LOG_ERROR, "Unable to add column: %s\n", sql->str);
 				}
-				PQclear(result);
+				PQclear(res);
 				ast_mutex_unlock(&pgsql_lock);
 
 				ast_free(sql);
@@ -1125,11 +1125,11 @@
 	return 0;
 }
 
-static int parse_config(int do_reload)
+static int parse_config(int reload)
 {
 	struct ast_config *config;
 	const char *s;
-	struct ast_flags config_flags = { do_reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
+	struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
 
 	if ((config = ast_config_load(RES_CONFIG_PGSQL_CONF, config_flags)) == CONFIG_STATUS_FILEUNCHANGED)
 		return 0;
@@ -1336,7 +1336,7 @@
 static char *handle_cli_realtime_pgsql_status(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
 {
 	char status[256], credentials[100] = "";
-	int ctimesec = time(NULL) - connect_time;
+	int ctime = time(NULL) - connect_time;
 
 	switch (cmd) {
 	case CLI_INIT:
@@ -1363,22 +1363,22 @@
 		if (!ast_strlen_zero(dbuser))
 			snprintf(credentials, sizeof(credentials), " with username %s", dbuser);
 
-		if (ctimesec > 31536000)
+		if (ctime > 31536000)
 			ast_cli(a->fd, "%s%s for %d years, %d days, %d hours, %d minutes, %d seconds.\n",
-					status, credentials, ctimesec / 31536000, (ctimesec % 31536000) / 86400,
-					(ctimesec % 86400) / 3600, (ctimesec % 3600) / 60, ctimesec % 60);
-		else if (ctimesec > 86400)
+					status, credentials, ctime / 31536000, (ctime % 31536000) / 86400,
+					(ctime % 86400) / 3600, (ctime % 3600) / 60, ctime % 60);
+		else if (ctime > 86400)
 			ast_cli(a->fd, "%s%s for %d days, %d hours, %d minutes, %d seconds.\n", status,
-					credentials, ctimesec / 86400, (ctimesec % 86400) / 3600, (ctimesec % 3600) / 60,
-					ctimesec % 60);
-		else if (ctimesec > 3600)
+					credentials, ctime / 86400, (ctime % 86400) / 3600, (ctime % 3600) / 60,
+					ctime % 60);
+		else if (ctime > 3600)
 			ast_cli(a->fd, "%s%s for %d hours, %d minutes, %d seconds.\n", status, credentials,
-					ctimesec / 3600, (ctimesec % 3600) / 60, ctimesec % 60);
-		else if (ctimesec > 60)
-			ast_cli(a->fd, "%s%s for %d minutes, %d seconds.\n", status, credentials, ctimesec / 60,
-					ctimesec % 60);
+					ctime / 3600, (ctime % 3600) / 60, ctime % 60);
+		else if (ctime > 60)
+			ast_cli(a->fd, "%s%s for %d minutes, %d seconds.\n", status, credentials, ctime / 60,
+					ctime % 60);
 		else
-			ast_cli(a->fd, "%s%s for %d seconds.\n", status, credentials, ctimesec);
+			ast_cli(a->fd, "%s%s for %d seconds.\n", status, credentials, ctime);
 
 		return CLI_SUCCESS;
 	} else {

Modified: team/seanbright/resolve-shadow-warnings/res/res_musiconhold.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/res/res_musiconhold.c?view=diff&rev=137030&r1=137029&r2=137030
==============================================================================
--- team/seanbright/resolve-shadow-warnings/res/res_musiconhold.c (original)
+++ team/seanbright/resolve-shadow-warnings/res/res_musiconhold.c Sat Aug  9 19:58:11 2008
@@ -985,7 +985,7 @@
 	return 0;
 }
 
-static int moh_register(struct mohclass *moh, int do_reload)
+static int moh_register(struct mohclass *moh, int is_reload)
 {
 #ifdef HAVE_DAHDI
 	int x;
@@ -1326,21 +1326,21 @@
 		chan->name, chan->uniqueid);
 }
 
-static int load_moh_classes(int do_reload)
+static int load_moh_classes(int is_reload)
 {
 	struct ast_config *cfg;
 	struct ast_variable *var;
 	struct mohclass *class;	
 	char *cat;
 	int numclasses = 0;
-	struct ast_flags config_flags = { do_reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
+	struct ast_flags config_flags = { is_reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
 
 	cfg = ast_config_load("musiconhold.conf", config_flags);
 
 	if (cfg == NULL || cfg == CONFIG_STATUS_FILEUNCHANGED)
 		return 0;
 
-	if (do_reload) {
+	if (is_reload) {
 		AST_RWLIST_WRLOCK(&mohclasses);
 		AST_RWLIST_TRAVERSE(&mohclasses, class, list) {
 			class->delete = 1;
@@ -1417,7 +1417,7 @@
 			}
 
 			/* Don't leak a class when it's already registered */
-			moh_register(class, do_reload);
+			moh_register(class, is_reload);
 
 			numclasses++;
 		}
@@ -1569,16 +1569,16 @@
 	AST_CLI_DEFINE(handle_cli_moh_show_files,   "List MusicOnHold file-based classes")
 };
 
-static int init_classes(int do_reload) 
+static int init_classes(int is_reload) 
 {
 	struct mohclass *moh;
     
-	if (!load_moh_classes(do_reload)) 		/* Load classes from config */
+	if (!load_moh_classes(is_reload)) 		/* Load classes from config */
 		return 0;			/* Return if nothing is found */
 
 	AST_RWLIST_WRLOCK(&mohclasses);
 	AST_RWLIST_TRAVERSE_SAFE_BEGIN(&mohclasses, moh, list) {
-		if (do_reload && moh->delete) {
+		if (is_reload && moh->delete) {
 			AST_RWLIST_REMOVE_CURRENT(list);
 			if (!moh->inuse)
 				ast_moh_destroy_one(moh);




More information about the asterisk-commits mailing list