rlm_sqlippool: pass sql instance to sql escape func
authorPhil Mayers <p.mayers@imperial.ac.uk>
Fri, 21 Sep 2012 16:59:37 +0000 (17:59 +0100)
committerPhil Mayers <p.mayers@imperial.ac.uk>
Fri, 5 Oct 2012 11:52:48 +0000 (12:52 +0100)
src/modules/rlm_sqlippool/rlm_sqlippool.c

index a6eecca..d3772fd 100644 (file)
@@ -307,7 +307,7 @@ static int sqlippool_command(const char * fmt, SQLSOCK * sqlsocket,
         * Do an xlat on the provided string
         */
        if (request) {
-               if (!radius_xlat(query, sizeof(query), expansion, request, data->sql_inst->sql_escape_func, NULL)) {
+               if (!radius_xlat(query, sizeof(query), expansion, request, data->sql_inst->sql_escape_func, data->sql_inst)) {
                        radlog(L_ERR, "sqlippool_command: xlat failed on: '%s'", query);
                        return 0;
                }
@@ -346,7 +346,7 @@ static int sqlippool_query1(char * out, int outlen, const char * fmt,
         * Do an xlat on the provided string
         */
        if (request) {
-               if (!radius_xlat(query, sizeof(query), expansion, request, data->sql_inst->sql_escape_func, NULL)) {
+               if (!radius_xlat(query, sizeof(query), expansion, request, data->sql_inst->sql_escape_func, data->sql_inst)) {
                        radlog(L_ERR, "sqlippool_command: xlat failed.");
                        out[0] = '\0';
                        return 0;