[asterisk-commits] mmichelson: branch 1.4 r263639 - /branches/1.4/main/devicestate.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon May 17 17:00:31 CDT 2010
Author: mmichelson
Date: Mon May 17 17:00:28 2010
New Revision: 263639
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=263639
Log:
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:
branches/1.4/main/devicestate.c
Modified: branches/1.4/main/devicestate.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/main/devicestate.c?view=diff&rev=263639&r1=263638&r2=263639
==============================================================================
--- branches/1.4/main/devicestate.c (original)
+++ branches/1.4/main/devicestate.c Mon May 17 17:00:28 2010
@@ -145,7 +145,7 @@
number = buf;
if (!number) {
provider = strsep(&tech, ":");
- if (!provider)
+ if (!tech)
return AST_DEVICE_INVALID;
/* We have a provider */
number = tech;
More information about the asterisk-commits
mailing list