[asterisk-commits] tilghman: branch 1.4 r131970 - in /branches/1.4: channels/ include/asterisk/ ...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jul 18 11:30:31 CDT 2008


Author: tilghman
Date: Fri Jul 18 11:30:31 2008
New Revision: 131970

URL: http://svn.digium.com/view/asterisk?view=rev&rev=131970
Log:
Make the ast_assert call within ast_sched_del report something useful.

Modified:
    branches/1.4/channels/chan_iax2.c
    branches/1.4/include/asterisk/sched.h
    branches/1.4/main/sched.c

Modified: branches/1.4/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_iax2.c?view=diff&rev=131970&r1=131969&r2=131970
==============================================================================
--- branches/1.4/channels/chan_iax2.c (original)
+++ branches/1.4/channels/chan_iax2.c Fri Jul 18 11:30:31 2008
@@ -1051,8 +1051,8 @@
 			/* I am the schedule, so I'm allowed to do this */
 			iaxs[callno]->lagid = -1;
 		}
-	} else if (option_debug > 0) {
-		ast_log(LOG_DEBUG, "I was supposed to send a LAGRQ with callno %d, but no such call exists (and I cannot remove lagid, either).\n", callno);
+	} else {
+		ast_log(LOG_WARNING, "I was supposed to send a LAGRQ with callno %d, but no such call exists (and I cannot remove lagid, either).\n", callno);
 	}
 
 	ast_mutex_unlock(&iaxsl[callno]);

Modified: branches/1.4/include/asterisk/sched.h
URL: http://svn.digium.com/view/asterisk/branches/1.4/include/asterisk/sched.h?view=diff&rev=131970&r1=131969&r2=131970
==============================================================================
--- branches/1.4/include/asterisk/sched.h (original)
+++ branches/1.4/include/asterisk/sched.h Fri Jul 18 11:30:31 2008
@@ -118,7 +118,8 @@
  * \param id ID of the scheduled item to delete
  * \return Returns 0 on success, -1 on failure
  */
-int ast_sched_del(struct sched_context *con, int id);
+int _ast_sched_del(struct sched_context *con, int id, const char *file, int line, const char *function);
+#define	ast_sched_del(a, b)	_ast_sched_del(a, b, __FILE__, __LINE__, __PRETTY_FUNCTION__)
 
 /*! \brief Determines number of seconds until the next outstanding event to take place
  * Determine the number of seconds until the next outstanding event

Modified: branches/1.4/main/sched.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/sched.c?view=diff&rev=131970&r1=131969&r2=131970
==============================================================================
--- branches/1.4/main/sched.c (original)
+++ branches/1.4/main/sched.c Fri Jul 18 11:30:31 2008
@@ -255,7 +255,7 @@
  * would be two or more in the list with that
  * id.
  */
-int ast_sched_del(struct sched_context *con, int id)
+int _ast_sched_del(struct sched_context *con, int id, const char *file, int line, const char *function)
 {
 	struct sched *s;
 
@@ -282,7 +282,7 @@
 	if (!s) {
 		if (option_debug)
 			ast_log(LOG_DEBUG, "Attempted to delete nonexistent schedule entry %d!\n", id);
-		ast_assert(s != NULL);
+		_ast_assert(0, "s != NULL", file, line, function);
 		return -1;
 	}
 	




More information about the asterisk-commits mailing list