[asterisk-commits] rmudgett: trunk r293649 - in /trunk: ./ channels/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Nov 2 16:31:21 CDT 2010


Author: rmudgett
Date: Tue Nov  2 16:31:17 2010
New Revision: 293649

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=293649
Log:
Merged revisions 293648 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r293648 | rmudgett | 2010-11-02 16:29:25 -0500 (Tue, 02 Nov 2010) | 20 lines
  
  Merged revisions 293647 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r293647 | rmudgett | 2010-11-02 16:26:30 -0500 (Tue, 02 Nov 2010) | 13 lines
    
    Merged revisions 293639 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r293639 | rmudgett | 2010-11-02 16:24:13 -0500 (Tue, 02 Nov 2010) | 6 lines
      
      Make warning message have more useful information in it.
      
      Change "Unable to get index, and nullok is not asserted" to "Unable to get
      index for '<channel-name>' on channel <number> (<function>(), line
      <number>)".
    ........
  ................
................

Modified:
    trunk/   (props changed)
    trunk/channels/chan_dahdi.c
    trunk/channels/sig_analog.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: trunk/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_dahdi.c?view=diff&rev=293649&r1=293648&r2=293649
==============================================================================
--- trunk/channels/chan_dahdi.c (original)
+++ trunk/channels/chan_dahdi.c Tue Nov  2 16:31:17 2010
@@ -3539,7 +3539,8 @@
 /*! Round robin search locations. */
 static struct dahdi_pvt *round_robin[32];
 
-static int dahdi_get_index(struct ast_channel *ast, struct dahdi_pvt *p, int nullok)
+#define dahdi_get_index(ast, p, nullok)	_dahdi_get_index(ast, p, nullok, __PRETTY_FUNCTION__, __LINE__)
+static int _dahdi_get_index(struct ast_channel *ast, struct dahdi_pvt *p, int nullok, const char *fname, unsigned long line)
 {
 	int res;
 	if (p->subs[SUB_REAL].owner == ast)
@@ -3551,7 +3552,9 @@
 	else {
 		res = -1;
 		if (!nullok)
-			ast_log(LOG_WARNING, "Unable to get index, and nullok is not asserted\n");
+			ast_log(LOG_WARNING,
+				"Unable to get index for '%s' on channel %d (%s(), line %lu)\n",
+				ast ? ast->name : "", p->channel, fname, line);
 	}
 	return res;
 }

Modified: trunk/channels/sig_analog.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/sig_analog.c?view=diff&rev=293649&r1=293648&r2=293649
==============================================================================
--- trunk/channels/sig_analog.c (original)
+++ trunk/channels/sig_analog.c Tue Nov  2 16:31:17 2010
@@ -373,7 +373,8 @@
 	return 0;
 }
 
-static int analog_get_index(struct ast_channel *ast, struct analog_pvt *p, int nullok)
+#define analog_get_index(ast, p, nullok)	_analog_get_index(ast, p, nullok, __PRETTY_FUNCTION__, __LINE__)
+static int _analog_get_index(struct ast_channel *ast, struct analog_pvt *p, int nullok, const char *fname, unsigned long line)
 {
 	int res;
 	if (p->subs[ANALOG_SUB_REAL].owner == ast) {
@@ -385,7 +386,9 @@
 	} else {
 		res = -1;
 		if (!nullok) {
-			ast_log(LOG_WARNING, "Unable to get index, and nullok is not asserted\n");
+			ast_log(LOG_WARNING,
+				"Unable to get index for '%s' on channel %d (%s(), line %lu)\n",
+				ast ? ast->name : "", p->channel, fname, line);
 		}
 	}
 	return res;




More information about the asterisk-commits mailing list