Changeset 772:c6969f1af9f3 in freeDiameter for tests
- Timestamp:
- Nov 1, 2011, 6:12:18 PM (13 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/testappacct.c
r771 r772 253 253 { 254 254 PGresult * res; 255 char * s; 255 uint8_t * bs; 256 char * es; 257 size_t l; 258 int i; 256 259 res = PQexec(conn, "SELECT \"Session-Id\" from " TABLE ";"); 257 260 CHECK( PGRES_TUPLES_OK, PQresultStatus(res) ); 258 261 259 262 /* 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) ); 262 267 263 268 PQclear(res); 269 PQfreemem(bs); 264 270 } 265 271
Note: See TracChangeset
for help on using the changeset viewer.