summaryrefslogtreecommitdiff
path: root/test/test.h
diff options
context:
space:
mode:
authorAlfred E. Heggestad <aeh@db.org>2015-10-04 21:24:31 +0200
committerAlfred E. Heggestad <aeh@db.org>2015-10-04 21:24:31 +0200
commit5cbd1d17177236f7c4515f077c18d328c76af9b1 (patch)
tree287a08249ce9a545318c67985688902e221b4f6d /test/test.h
parent26b1c86e32abc1d2543d667c80b3532e6e178c16 (diff)
test: use new sipsrv from retest
Diffstat (limited to 'test/test.h')
-rw-r--r--test/test.h32
1 files changed, 27 insertions, 5 deletions
diff --git a/test/test.h b/test/test.h
index c2caa6a..61ddd27 100644
--- a/test/test.h
+++ b/test/test.h
@@ -33,21 +33,43 @@
goto out; \
}
+#define TEST_ERR(err) \
+ if ((err)) { \
+ (void)re_fprintf(stderr, "\n"); \
+ warning("TEST_ERR: %s:%u:" \
+ " (%m)\n", \
+ __FILE__, __LINE__, \
+ (err)); \
+ goto out; \
+ }
+
/* helpers */
int re_main_timeout(uint32_t timeout);
+
+#ifdef USE_TLS
+extern const char test_certificate[];
+#endif
+
+
+/*
+ * SIP Server
+ */
+
struct sip_server {
- struct sa laddr;
- struct udp_sock *us;
struct sip *sip;
-
- bool got_register_req;
+ struct sip_lsnr *lsnr;
bool terminate;
+
+ unsigned n_register_req;
+ enum sip_transp tp_last;
};
-int sip_server_create(struct sip_server **srvp);
+int sip_server_alloc(struct sip_server **srvp);
+int sip_server_uri(struct sip_server *srv, char *uri, size_t sz,
+ enum sip_transp tp);
/* test cases */