[svn-commits] mmichelson: branch mmichelson/trunk-digiumphones r361328 - in /team/mmichelso...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Apr 5 17:29:45 CDT 2012


Author: mmichelson
Date: Thu Apr  5 17:29:41 2012
New Revision: 361328

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=361328
Log:
Switch some uses of int to enum ast_presence_state.


Modified:
    team/mmichelson/trunk-digiumphones/funcs/func_presencestate.c
    team/mmichelson/trunk-digiumphones/main/presencestate.c

Modified: team/mmichelson/trunk-digiumphones/funcs/func_presencestate.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/trunk-digiumphones/funcs/func_presencestate.c?view=diff&rev=361328&r1=361327&r2=361328
==============================================================================
--- team/mmichelson/trunk-digiumphones/funcs/func_presencestate.c (original)
+++ team/mmichelson/trunk-digiumphones/funcs/func_presencestate.c Thu Apr  5 17:29:41 2012
@@ -153,7 +153,7 @@
 	return 0;
 }
 
-static int parse_data(char *data, int *state, char **subtype, char **message, char **options)
+static int parse_data(char *data, enum ast_presence_state *state, char **subtype, char **message, char **options)
 {
 	char *state_str;
 
@@ -203,7 +203,7 @@
 	size_t len = strlen("CustomPresence:");
 	char *tmp = data;
 	char *args = ast_strdupa(value);
-	int state;
+	enum ast_presence_state state;
 	char *options, *message, *subtype;
 
 	if (strncasecmp(data, "CustomPresence:", len)) {
@@ -231,7 +231,7 @@
 static enum ast_presence_state custom_presence_callback(const char *data, char **subtype, char **message)
 {
 	char buf[1301] = "";
-	int state;
+	enum ast_presence_state state;
 	char *_options;
 	char *_message;
 	char *_subtype;
@@ -302,7 +302,7 @@
 	for (; db_entry; db_entry = db_entry->next) {
 		const char *object_name = strrchr(db_entry->key, '/') + 1;
 		char state_info[1301];
-		int state;
+		enum ast_presence_state state;
 		char *subtype;
 		char *message;
 		char *options;
@@ -340,7 +340,7 @@
 {
     size_t len;
 	const char *dev, *state, *full_dev;
-	int state_val;
+	enum ast_presence_state state_val;
 	char *message;
 	char *subtype;
 	char *options;
@@ -429,7 +429,7 @@
 AST_TEST_DEFINE(test_valid_parse_data)
 {
 	int i;
-	int state;
+	enum ast_presence_state state;
 	char *subtype;
 	char *message;
 	char *options;
@@ -578,7 +578,7 @@
 AST_TEST_DEFINE(test_invalid_parse_data)
 {
 	int i;
-	int state;
+	enum ast_presence_state state;
 	char *subtype;
 	char *message;
 	char *options;
@@ -727,7 +727,7 @@
 	for (; db_entry; db_entry = db_entry->next) {
 		const char *dev_name = strrchr(db_entry->key, '/') + 1;
 		char state_info[1301];
-		int state;
+		enum ast_presence_state state;
 		char *message;
 		char *subtype;
 		char *options;

Modified: team/mmichelson/trunk-digiumphones/main/presencestate.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/trunk-digiumphones/main/presencestate.c?view=diff&rev=361328&r1=361327&r2=361328
==============================================================================
--- team/mmichelson/trunk-digiumphones/main/presencestate.c (original)
+++ team/mmichelson/trunk-digiumphones/main/presencestate.c Thu Apr  5 17:29:41 2012
@@ -223,7 +223,7 @@
 {
 	char *subtype = NULL;
 	char *message = NULL;
-	int state;
+	enum ast_presence_state state;
 
 	state = ast_presence_state_helper(provider, &subtype, &message, 0);
 




More information about the svn-commits mailing list