5359edc160de518d8e43fdd3448365c15b912c3c galt Mon Jul 22 11:48:10 2019 -0700 Added ipv6 support. Listening processes us hybrid dual stack feature of OS to simplify implementation and use a single listening socket. Works with both TCP and UDP. Parasol working. geoIp also updated and ready for IPv6. Should be invisible to most users, while providing connections via ipv6 where available. Supports both ipv4 and ipv6. diff --git src/hg/inc/jksql.h src/hg/inc/jksql.h index 2a90f19..5ee523a 100644 --- src/hg/inc/jksql.h +++ src/hg/inc/jksql.h @@ -215,30 +215,35 @@ /* Load a tab-seperated file into a database table, checking for errors. * Options are the SQL_TAB_* bit set. SQL_TAB_FILE_ON_SERVER is ignored if * sqlIsRemote() returns true. */ struct sqlResult *sqlGetResultExt(struct sqlConnection *sc, char *query, unsigned int *errorNo, char **error); /* Returns NULL if it had an error. * Otherwise returns a structure that you can do sqlRow() on. * If there was an error, *errorNo will be set to the mysql error number, * and *error will be set to the mysql error string, which MUST NOT be freed. */ struct sqlResult *sqlGetResult(struct sqlConnection *sc, char *query); /* (Returns NULL if result was empty. : * old info, only applies with mysql_store_result not mysql_use_result) * Otherwise returns a structure that you can do sqlRow() on. */ +unsigned long sqlEscapeStringFull(char *to, const char* from, long fromLength); +/* Prepares a string for inclusion in a sql statement. Output string + * must be 2*strlen(from)+1. fromLength is the length of the from data. + * Specifying fromLength allows one to encode a binary string that can contain any character including 0. */ + char *sqlEscapeString(const char* from); /* Prepares string for inclusion in a SQL statement . Remember to free * returned string. Returned string contains strlen(length)*2+1 as many bytes * as orig because in worst case every character has to be escaped.*/ char *sqlEscapeString2(char *to, const char* from); /* Prepares a string for inclusion in a sql statement. Output string * must be 2*strlen(from)+1 */ unsigned long sqlEscapeString3(char *to, const char* from); /* Prepares a string for inclusion in a sql statement. Output string * must be 2*strlen(from)+1. Returns actual escaped size not counting term 0. */ void sqlDyAppendEscaped(struct dyString *dy, char *s); /* Append to dy an escaped s */