[asterisk-commits] russell: branch group/asterisk-cpp r168442 - in /team/group/asterisk-cpp: ./ ...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Jan 11 13:45:04 CST 2009


Author: russell
Date: Sun Jan 11 13:45:04 2009
New Revision: 168442

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=168442
Log:
global_datastores.c builds

Modified:
    team/group/asterisk-cpp/README-cpp
    team/group/asterisk-cpp/main/global_datastores.c

Modified: team/group/asterisk-cpp/README-cpp
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/README-cpp?view=diff&rev=168442&r1=168441&r2=168442
==============================================================================
--- team/group/asterisk-cpp/README-cpp (original)
+++ team/group/asterisk-cpp/README-cpp Sun Jan 11 13:45:04 2009
@@ -3,7 +3,7 @@
 ----------------------------------
 
 mmichelson: manager.c, http.c
-russell: global_datastores.c
+russell: 
 seanbright: srv.c, channel.c
 
 ----------------------------------

Modified: team/group/asterisk-cpp/main/global_datastores.c
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/main/global_datastores.c?view=diff&rev=168442&r1=168441&r2=168442
==============================================================================
--- team/group/asterisk-cpp/main/global_datastores.c (original)
+++ team/group/asterisk-cpp/main/global_datastores.c Sun Jan 11 13:45:04 2009
@@ -30,10 +30,13 @@
 #include "asterisk/global_datastores.h"
 #include "asterisk/linkedlists.h"
 
+/*! define dialed_interfaces type */
+AST_LIST_HEAD(dialed_interfaces, ast_dialed_interface);
+
 static void dialed_interface_destroy(void *data)
 {
 	struct ast_dialed_interface *di = NULL;
-	AST_LIST_HEAD(, ast_dialed_interface) *dialed_interface_list = data;
+	dialed_interfaces *dialed_interface_list = (dialed_interfaces *) data;
 	
 	if (!dialed_interface_list) {
 		return;
@@ -51,21 +54,22 @@
 static void *dialed_interface_duplicate(void *data)
 {
 	struct ast_dialed_interface *di = NULL;
-	AST_LIST_HEAD(, ast_dialed_interface) *old_list;
-	AST_LIST_HEAD(, ast_dialed_interface) *new_list = NULL;
+	dialed_interfaces *old_list;
+	dialed_interfaces *new_list = NULL;
 
-	if(!(old_list = data)) {
+	if (!(old_list = (dialed_interfaces *) data)) {
 		return NULL;
 	}
 
-	if(!(new_list = ast_calloc(1, sizeof(*new_list)))) {
+	if (!(new_list = (dialed_interfaces *) ast_calloc(1, sizeof(*new_list)))) {
 		return NULL;
 	}
 
 	AST_LIST_HEAD_INIT(new_list);
 	AST_LIST_LOCK(old_list);
 	AST_LIST_TRAVERSE(old_list, di, list) {
-		struct ast_dialed_interface *di2 = ast_calloc(1, sizeof(*di2) + strlen(di->interface));
+		struct ast_dialed_interface *di2;
+		di2 = (struct ast_dialed_interface *) ast_calloc(1, sizeof(*di2) + strlen(di->interface));
 		if(!di2) {
 			AST_LIST_UNLOCK(old_list);
 			dialed_interface_destroy(new_list);
@@ -82,9 +86,9 @@
 
 static void *dial_features_duplicate(void *data)
 {
-	struct ast_dial_features *df = data, *df_copy;
+	struct ast_dial_features *df = (struct ast_dial_features *) data, *df_copy;
 
-	if (!(df_copy = ast_calloc(1, sizeof(*df)))) {
+	if (!(df_copy = (struct ast_dial_features *) ast_calloc(1, sizeof(*df)))) {
 		return NULL;
 	}
 
@@ -93,21 +97,16 @@
 	return df_copy;
 }
 
-static void dial_features_destroy(void *data) {
-	struct ast_dial_features *df = data;
+static void dial_features_destroy(void *data)
+{
+	struct ast_dial_features *df = (struct ast_dial_features *) data;
 	if (df) {
 		ast_free(df);
 	}
 }
 
-const struct ast_datastore_info dialed_interface_info = {
-	.type = "dialed-interface",
-	.destroy = dialed_interface_destroy,
-	.duplicate = dialed_interface_duplicate,
-};
+const struct ast_datastore_info dialed_interface_info("dialed-interface",
+		dialed_interface_destroy, NULL, dialed_interface_duplicate);
 
-const struct ast_datastore_info dial_features_info = {
-	.type = "dial-features",
-	.destroy = dial_features_destroy,
-	.duplicate = dial_features_duplicate,
-};
+const struct ast_datastore_info dial_features_info("dial-features",
+		dial_features_destroy, NULL, dial_features_duplicate);




More information about the asterisk-commits mailing list