[asterisk-commits] seanbright: branch group/1.6.1-maintenance r263643 - in /team/group/1.6.1-mai...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon May 17 17:12:07 CDT 2010


Author: seanbright
Date: Mon May 17 17:12:04 2010
New Revision: 263643

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=263643
Log:
Merged revisions 263640 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
  r263640 | mmichelson | 2010-05-17 18:08:01 -0400 (Mon, 17 May 2010) | 16 lines
  
  Merged revisions 263639 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r263639 | mmichelson | 2010-05-17 17:00:28 -0500 (Mon, 17 May 2010) | 10 lines
    
    Fix logic error when checking for a devstate provider.
    
    When using strsep, if one of the list of specified separators is not found,
    it is the first parameter to strsep which is now NULL, not the pointer returned
    by strsep.
    
    This issue isn't especially severe in that the worst it is likely to do is waste
    some cycles when a device with no '/' and no ':' is passed to ast_device_state.
  ........
................

Modified:
    team/group/1.6.1-maintenance/   (props changed)
    team/group/1.6.1-maintenance/main/devicestate.c

Propchange: team/group/1.6.1-maintenance/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: team/group/1.6.1-maintenance/main/devicestate.c
URL: http://svnview.digium.com/svn/asterisk/team/group/1.6.1-maintenance/main/devicestate.c?view=diff&rev=263643&r1=263642&r2=263643
==============================================================================
--- team/group/1.6.1-maintenance/main/devicestate.c (original)
+++ team/group/1.6.1-maintenance/main/devicestate.c Mon May 17 17:12:04 2010
@@ -353,8 +353,10 @@
 	buf = ast_strdupa(device);
 	tech = strsep(&buf, "/");
 	if (!(number = buf)) {
-		if (!(provider = strsep(&tech, ":")))
+		provider = strsep(&tech, ":");
+		if (!tech) {
 			return AST_DEVICE_INVALID;
+		}
 		/* We have a provider */
 		number = tech;
 		tech = NULL;




More information about the asterisk-commits mailing list