Navigation


Changeset 771:eac79a449c06 in freeDiameter for tests/testappacct.c


Ignore:
Timestamp:
Oct 31, 2011, 4:57:59 AM (13 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Making app_acct thread_safe for PGsql. NOT TESTED.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/testappacct.c

    r740 r771  
    9191int main(int argc, char *argv[])
    9292{
    93         extern PGconn *conn; /* in acct_db.c */
     93        extern pthread_key_t connk; /* in acct_db.c */
     94        PGconn *conn;
    9495        extern int fd_ext_init(int major, int minor, char * conffile); /* defined in include's extension.h */
    9596        extern void fd_ext_fini(void); /* defined in the extension itself */
     
    122123                /* Now, call the one of the extension */
    123124                CHECK( 0, fd_ext_init(FD_PROJECT_VERSION_MAJOR, FD_PROJECT_VERSION_MINOR,NULL) );
     125                conn = pthread_getspecific(connk);
    124126        }
    125127       
Note: See TracChangeset for help on using the changeset viewer.