[asterisk-commits] rmudgett: trunk r396812 - in /trunk: main/ res/ res/parking/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Aug 15 16:52:02 CDT 2013


Author: rmudgett
Date: Thu Aug 15 16:52:01 2013
New Revision: 396812

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=396812
Log:
Minor parking cleanup.

Modified:
    trunk/main/features.c
    trunk/res/parking/parking_tests.c
    trunk/res/parking/res_parking.h
    trunk/res/res_parking.c

Modified: trunk/main/features.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/features.c?view=diff&rev=396812&r1=396811&r2=396812
==============================================================================
--- trunk/main/features.c (original)
+++ trunk/main/features.c Thu Aug 15 16:52:01 2013
@@ -232,8 +232,6 @@
 	</manager>
  ***/
 
-/* TODO Scrape all of the parking stuff out of features.c */
-
 typedef enum {
 	FEATURE_INTERPRET_DETECT, /* Used by ast_feature_detect */
 	FEATURE_INTERPRET_DO,     /* Used by feature_interpret */

Modified: trunk/res/parking/parking_tests.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/parking/parking_tests.c?view=diff&rev=396812&r1=396811&r2=396812
==============================================================================
--- trunk/res/parking/parking_tests.c (original)
+++ trunk/res/parking/parking_tests.c Thu Aug 15 16:52:01 2013
@@ -804,42 +804,32 @@
 #endif /* TEST_FRAMEWORK */
 
 
-int unload_parking_tests(void)
+void unload_parking_tests(void)
 {
 /* NOOP without test framework */
 #if defined(TEST_FRAMEWORK)
-
+	AST_TEST_UNREGISTER(create_lot);
+	AST_TEST_UNREGISTER(park_call);
+	AST_TEST_UNREGISTER(retrieve_call);
+	AST_TEST_UNREGISTER(park_extensions);
+	AST_TEST_UNREGISTER(extension_conflicts);
+	AST_TEST_UNREGISTER(dynamic_parking_variables);
+#endif
+}
+
+int load_parking_tests(void)
+{
 	int res = 0;
 
-	res |= AST_TEST_UNREGISTER(create_lot);
-	res |= AST_TEST_UNREGISTER(park_call);
-	res |= AST_TEST_UNREGISTER(retrieve_call);
-	res |= AST_TEST_UNREGISTER(park_extensions);
-	res |= AST_TEST_UNREGISTER(extension_conflicts);
-	res |= AST_TEST_UNREGISTER(dynamic_parking_variables);
-
-	return res;
-#endif
-
-	return 0;
-}
-
-int load_parking_tests(void)
-{
 /* NOOP without test framework */
 #if defined(TEST_FRAMEWORK)
-
-	int res = 0;
-
 	res |= AST_TEST_REGISTER(create_lot);
 	res |= AST_TEST_REGISTER(park_call);
 	res |= AST_TEST_REGISTER(retrieve_call);
 	res |= AST_TEST_REGISTER(park_extensions);
 	res |= AST_TEST_REGISTER(extension_conflicts);
 	res |= AST_TEST_REGISTER(dynamic_parking_variables);
+#endif
 
 	return res;
-#endif
-
-	return 0;
-}
+}

Modified: trunk/res/parking/res_parking.h
URL: http://svnview.digium.com/svn/asterisk/trunk/res/parking/res_parking.h?view=diff&rev=396812&r1=396811&r2=396812
==============================================================================
--- trunk/res/parking/res_parking.h (original)
+++ trunk/res/parking/res_parking.h Thu Aug 15 16:52:01 2013
@@ -568,7 +568,6 @@
  * \since 12.0.0
  * \brief Unregister parking unit tests
  *
- * \retval 0 on success
- * \retval nonzero on failure
- */
-int unload_parking_tests(void);
+ * \return Nothing
+ */
+void unload_parking_tests(void);

Modified: trunk/res/res_parking.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_parking.c?view=diff&rev=396812&r1=396811&r2=396812
==============================================================================
--- trunk/res/res_parking.c (original)
+++ trunk/res/res_parking.c Thu Aug 15 16:52:01 2013
@@ -196,8 +196,6 @@
 #define PARKED_CALL_APPLICATION "ParkedCall"
 #define PARK_AND_ANNOUNCE_APPLICATION "ParkAndAnnounce"
 
-/* TODO Add unit tests for parking */
-
 static int parking_lot_sort_fn(const void *obj_left, const void *obj_right, int flags)
 {
 	const struct parking_lot *left = obj_left;




More information about the asterisk-commits mailing list