~yolanda.robla/ubuntu/saucy/freeradius/dep-8-tests

« back to all changes in this revision

Viewing changes to src/modules/rlm_sqlcounter/rlm_sqlcounter.c

  • Committer: Bazaar Package Importer
  • Author(s): Josip Rodin
  • Date: 2009-11-23 03:57:37 UTC
  • mto: This revision was merged to the branch mainline in revision 7.
  • Revision ID: james.westby@ubuntu.com-20091123035737-snauioz5r9tf8sdr
Tags: upstream-2.1.7+dfsg
ImportĀ upstreamĀ versionĀ 2.1.7+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * rlm_sqlcounter.c
3
3
 *
4
 
 * Version:  $Id: rlm_sqlcounter.c,v 1.39 2008/04/20 14:19:46 aland Exp $
 
4
 * Version:  $Id$
5
5
 *
6
6
 *   This program is free software; you can redistribute it and/or modify
7
7
 *   it under the terms of the GNU General Public License as published by
25
25
 
26
26
 
27
27
#include <freeradius-devel/ident.h>
28
 
RCSID("$Id: rlm_sqlcounter.c,v 1.39 2008/04/20 14:19:46 aland Exp $")
 
28
RCSID("$Id$")
29
29
 
30
30
#include <freeradius-devel/radiusd.h>
31
31
#include <freeradius-devel/modules.h>
305
305
        const char *p;
306
306
        char *q;
307
307
        char tmpdt[40]; /* For temporary storing of dates */
308
 
        int openbraces=0;
309
308
 
310
309
        q = out;
311
310
        for (p = fmt; *p ; p++) {
314
313
                if (freespace <= 1)
315
314
                        break;
316
315
                c = *p;
317
 
                if ((c != '%') && (c != '$') && (c != '\\')) {
318
 
                        /*
319
 
                         * We check if we're inside an open brace.  If we are
320
 
                         * then we assume this brace is NOT literal, but is
321
 
                         * a closing brace and apply it
322
 
                         */
323
 
                        if((c == '}') && openbraces) {
324
 
                                openbraces--;
325
 
                                continue;
326
 
                        }
 
316
                if ((c != '%') && (c != '\\')) {
327
317
                        *q++ = *p;
328
318
                        continue;
329
319
                }