[asterisk-commits] seanbright: branch group/asterisk-cpp r168190 - /team/group/asterisk-cpp/main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jan 9 15:28:08 CST 2009


Author: seanbright
Date: Fri Jan  9 15:28:07 2009
New Revision: 168190

URL: http://svn.digium.com/view/asterisk?view=rev&rev=168190
Log:
Named initializers be damned.  abstract_jb.c compiles.

Modified:
    team/group/asterisk-cpp/main/abstract_jb.c

Modified: team/group/asterisk-cpp/main/abstract_jb.c
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-cpp/main/abstract_jb.c?view=diff&rev=168190&r1=168189&r2=168190
==============================================================================
--- team/group/asterisk-cpp/main/abstract_jb.c (original)
+++ team/group/asterisk-cpp/main/abstract_jb.c Fri Jan  9 15:28:07 2009
@@ -73,8 +73,7 @@
 /*!
  * \brief Jitterbuffer implementation private struct.
  */
-struct ast_jb_impl
-{
+struct ast_jb_impl {
 	char name[AST_JB_IMPL_NAME_SIZE];
 	jb_create_impl create;
 	jb_destroy_impl destroy;
@@ -113,28 +112,28 @@
 static struct ast_jb_impl avail_impl[] = 
 {
 	{
-		.name = "fixed",
-		.create = jb_create_fixed,
-		.destroy = jb_destroy_fixed,
-		.put_first = jb_put_first_fixed,
-		.put = jb_put_fixed,
-		.get = jb_get_fixed,
-		.next = jb_next_fixed,
-		.remove = jb_remove_fixed,
-		.force_resync = jb_force_resynch_fixed,
-		.empty_and_reset = jb_empty_and_reset_fixed,
+		"fixed",
+		jb_create_fixed,
+		jb_destroy_fixed,
+		jb_put_first_fixed,
+		jb_put_fixed,
+		jb_get_fixed,
+		jb_next_fixed,
+		jb_remove_fixed,
+		jb_force_resynch_fixed,
+		jb_empty_and_reset_fixed,
 	},
 	{
-		.name = "adaptive",
-		.create = jb_create_adaptive,
-		.destroy = jb_destroy_adaptive,
-		.put_first = jb_put_first_adaptive,
-		.put = jb_put_adaptive,
-		.get = jb_get_adaptive,
-		.next = jb_next_adaptive,
-		.remove = jb_remove_adaptive,
-		.force_resync = jb_force_resynch_adaptive,
-		.empty_and_reset = jb_empty_and_reset_adaptive,
+		"adaptive",
+		jb_create_adaptive,
+		jb_destroy_adaptive,
+		jb_put_first_adaptive,
+		jb_put_adaptive,
+		jb_get_adaptive,
+		jb_next_adaptive,
+		jb_remove_adaptive,
+		jb_force_resynch_adaptive,
+		jb_empty_and_reset_adaptive,
 	}
 };
 
@@ -156,7 +155,7 @@
 	{JB_IMPL_OK, JB_IMPL_NOFRAME, JB_IMPL_NOFRAME, JB_IMPL_INTERP, JB_IMPL_DROP, JB_IMPL_OK};
 
 /* JB_GET actions (used only for the frames log) */
-static char *jb_get_actions[] = {"Delivered", "Dropped", "Interpolated", "No"};
+static const char *jb_get_actions[] = {"Delivered", "Dropped", "Interpolated", "No"};
 
 /*! \brief Macros for the frame log files */
 #define jb_framelog(...) do { \
@@ -678,7 +677,7 @@
 	int res;
 	
 	res = fixed_jb_get(fixedjb, &frame, now, interpl);
-	*fout = frame.data;
+	*fout = (struct ast_frame *) frame.data;
 	
 	return fixed_to_abstract_code[res];
 }
@@ -699,7 +698,7 @@
 	int res;
 	
 	res = fixed_jb_remove(fixedjb, &frame);
-	*fout = frame.data;
+	*fout = (struct ast_frame *) frame.data;
 	
 	return fixed_to_abstract_code[res];
 }
@@ -714,11 +713,11 @@
 
 static void jb_empty_and_reset_fixed(void *jb)
 {
-	struct fixed_jb *fixedjb = jb;
+	struct fixed_jb *fixedjb = (struct fixed_jb *) jb;
 	struct fixed_jb_frame f;
 
 	while (fixed_jb_remove(fixedjb, &f) == FIXED_JB_OK) {
-		ast_frfree(f.data);
+		ast_frfree((struct ast_frame *) f.data);
 	}
 }
 
@@ -773,7 +772,7 @@
 	int res;
 	
 	res = jb_get(adaptivejb, &frame, now, interpl);
-	*fout = frame.data;
+	*fout = (struct ast_frame *) frame.data;
 	
 	return adaptive_to_abstract_code[res];
 }
@@ -794,7 +793,7 @@
 	int res;
 	
 	res = jb_getall(adaptivejb, &frame);
-	*fout = frame.data;
+	*fout = (struct ast_frame *) frame.data;
 	
 	return adaptive_to_abstract_code[res];
 }
@@ -806,11 +805,11 @@
 
 static void jb_empty_and_reset_adaptive(void *jb)
 {
-	jitterbuf *adaptivejb = jb;
+	jitterbuf *adaptivejb = (jitterbuf *) jb;
 	jb_frame f;
 
 	while (jb_getall(adaptivejb, &f) == JB_OK) {
-		ast_frfree(f.data);
+		ast_frfree((struct ast_frame *) f.data);
 	}
 
 	jb_reset(adaptivejb);




More information about the asterisk-commits mailing list