[asterisk-commits] twilson: branch twilson/sqlite_astdb r323323 - /team/twilson/sqlite_astdb/main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jun 13 22:46:36 CDT 2011


Author: twilson
Date: Mon Jun 13 22:46:35 2011
New Revision: 323323

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=323323
Log:
Add the important part of that loop protection

Modified:
    team/twilson/sqlite_astdb/main/db.c

Modified: team/twilson/sqlite_astdb/main/db.c
URL: http://svnview.digium.com/svn/asterisk/team/twilson/sqlite_astdb/main/db.c?view=diff&rev=323323&r1=323322&r2=323323
==============================================================================
--- team/twilson/sqlite_astdb/main/db.c (original)
+++ team/twilson/sqlite_astdb/main/db.c Mon Jun 13 22:46:35 2011
@@ -195,6 +195,9 @@
 			!res; res = bdb->seq(bdb, &key, &value, R_NEXT)) {
 		last = !strcmp(key.data, last_key_s);
 		db_put_raw((const char *) key.data, key.size, (const char *) value.data, value.size);
+		if (last) {
+			break;
+		}
 	}
 
 	bdb->close(bdb);




More information about the asterisk-commits mailing list