The isInNet() function relies on being able to call a regex as a function,
which is invalid syntax in v8 and JSC.
Modify isInNet to use the standard exec() method of the RegExpObject to
test for a match.
---
src/javascript.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/javascript.h b/src/javascript.h
index c1d141e..d48bd0c 100644
--- a/src/javascript.h
+++ b/src/javascript.h
@@ -15,7 +15,7 @@
" return result;\n" \
"}\n" \
"function isInNet(ipaddr, pattern, maskstr) {\n" \
-" var test =
/^(\\d{1,4})\\.(\\d{1,4})\\.(\\d{1,4})\\.(\\d{1,4})$/(ipaddr);\n" \
+" var test =
/^(\\d{1,4})\\.(\\d{1,4})\\.(\\d{1,4})\\.(\\d{1,4})$/.exec(ipaddr);\n" \
" if (test == null) {\n" \
" ipaddr = dnsResolve(ipaddr);\n" \
" if (ipaddr == null)\n" \
--
1.8.1.4
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman