[asterisk-commits] tilghman: branch 1.6.2 r221974 - in /branches/1.6.2: ./ main/astobj2.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Oct 2 12:02:02 CDT 2009


Author: tilghman
Date: Fri Oct  2 12:01:58 2009
New Revision: 221974

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

................
  r221971 | tilghman | 2009-10-02 11:59:57 -0500 (Fri, 02 Oct 2009) | 9 lines
  
  Merged revisions 221970 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r221970 | tilghman | 2009-10-02 11:58:03 -0500 (Fri, 02 Oct 2009) | 2 lines
    
    Ensure the result of the hash function is positive.  Negative array offsets suck.
  ........
................

Modified:
    branches/1.6.2/   (props changed)
    branches/1.6.2/main/astobj2.c

Propchange: branches/1.6.2/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.2/main/astobj2.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.2/main/astobj2.c?view=diff&rev=221974&r1=221973&r2=221974
==============================================================================
--- branches/1.6.2/main/astobj2.c (original)
+++ branches/1.6.2/main/astobj2.c Fri Oct  2 12:01:58 2009
@@ -508,7 +508,7 @@
 	if (!p)
 		return NULL;
 
-	i = c->hash_fn(user_data, OBJ_POINTER);
+	i = abs(c->hash_fn(user_data, OBJ_POINTER));
 
 	ao2_lock(c);
 	i %= c->n_buckets;




More information about the asterisk-commits mailing list