Navigation


Changeset 772:c6969f1af9f3 in freeDiameter for tests/testappacct.c


Ignore:
Timestamp:
Nov 1, 2011, 6:12:18 PM (13 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Fix app_acct and associated test

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/testappacct.c

    r771 r772  
    253253        {
    254254                PGresult * res;
    255                 char * s;
     255                uint8_t * bs;
     256                char * es;
     257                size_t l;
     258                int i;
    256259                res = PQexec(conn, "SELECT \"Session-Id\" from " TABLE ";");
    257260                CHECK( PGRES_TUPLES_OK, PQresultStatus(res) );
    258261               
    259262                /* We also check that the Session-Id we retrieve is the same as what we generated earlier (not trashed in the process) */
    260                 s = PQgetvalue(res, 0, 0);
    261                 CHECK( 0, strcmp(s, (char *)sess_bkp) );
     263                es = PQgetvalue(res, 0, 0);
     264                bs = PQunescapeBytea((uint8_t *)es, &l);
     265               
     266                CHECK( 0, fd_os_cmp(bs, l, sess_bkp, sess_bkp_len) );
    262267               
    263268                PQclear(res);
     269                PQfreemem(bs);
    264270        } 
    265271
Note: See TracChangeset for help on using the changeset viewer.