summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2007-11-11 09:00:22 +0000
committerBenny Prijono <bennylp@teluu.com>2007-11-11 09:00:22 +0000
commit6dcd17a633dff79076bc16c49dd12541ae95a0f3 (patch)
treea2635415be2edb5f52ca30e38e09fe58916ac964
parentd97454b8c2e8f0a7501d3a5d2e5f43e282e98632 (diff)
Changed version to 0.8.0
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1576 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r--pjlib/include/pj/config_site_sample.h4
-rw-r--r--pjlib/src/pj/config.c2
-rw-r--r--pjsip-apps/src/samples/debug.c61
3 files changed, 63 insertions, 4 deletions
diff --git a/pjlib/include/pj/config_site_sample.h b/pjlib/include/pj/config_site_sample.h
index 85766517..1f1ed58a 100644
--- a/pjlib/include/pj/config_site_sample.h
+++ b/pjlib/include/pj/config_site_sample.h
@@ -17,8 +17,8 @@
# define PJ_HAS_FLOATING_POINT 0
# define PJMEDIA_HAS_G711_PLC 0
-# define PJMEDIA_HAS_SMALL_FILTER 1
-# define PJMEDIA_HAS_LARGE_FILTER 0
+//# define PJMEDIA_HAS_SMALL_FILTER 1
+//# define PJMEDIA_HAS_LARGE_FILTER 0
# define PJMEDIA_HAS_L16_CODEC 0
/*# define PJMEDIA_HAS_GSM_CODEC 0*/
/*# define PJMEDIA_HAS_ILBC_CODEC 0*/
diff --git a/pjlib/src/pj/config.c b/pjlib/src/pj/config.c
index 8cc3e983..c9604d2e 100644
--- a/pjlib/src/pj/config.c
+++ b/pjlib/src/pj/config.c
@@ -21,7 +21,7 @@
#include <pj/ioqueue.h>
static const char *id = "config.c";
-PJ_DEF_DATA(const char*) PJ_VERSION = "0.7.0-trunk";
+PJ_DEF_DATA(const char*) PJ_VERSION = "0.8.0";
/*
* Get PJLIB version string.
diff --git a/pjsip-apps/src/samples/debug.c b/pjsip-apps/src/samples/debug.c
index 0abedbf5..a86a78d9 100644
--- a/pjsip-apps/src/samples/debug.c
+++ b/pjsip-apps/src/samples/debug.c
@@ -27,4 +27,63 @@
* E.g.:
* #include "playfile.c"
*/
-#include "aectest.c"
+//#include "aectest.c"
+#include <pjlib.h>
+
+
+static void on_accept_complete(pj_ioqueue_key_t *key,
+ pj_ioqueue_op_key_t *op_key,
+ pj_sock_t sock,
+ pj_status_t status)
+{
+}
+
+static void on_read_complete(pj_ioqueue_key_t *key,
+ pj_ioqueue_op_key_t *op_key,
+ pj_ssize_t bytes_read)
+{
+}
+
+
+int main()
+{
+ pj_status_t status;
+ pj_caching_pool cp;
+ pj_pool_t *pool;
+ pj_sock_t sock, new_sock;
+ pj_ioqueue_t *ioqueue;
+ pj_ioqueue_op_key_t op_key;
+ pj_ioqueue_callback cb;
+ pj_ioqueue_key_t *key;
+
+ status = pj_init();
+ PJ_ASSERT_RETURN(status==PJ_SUCCESS, 1);
+
+ pj_caching_pool_init(&cp, NULL, 0);
+ pool = pj_pool_create(&cp.factory, "app", 1000, 1000, NULL);
+
+ status = pj_sock_socket(pj_AF_INET(), pj_SOCK_STREAM(), 0, &sock);
+ PJ_ASSERT_RETURN(status==PJ_SUCCESS, 1);
+
+ status = pj_sock_bind_in(sock, 0, 80);
+ if (status != PJ_SUCCESS)
+ return 1;
+
+ status = pj_ioqueue_create(pool, PJ_IOQUEUE_MAX_HANDLES, &ioqueue);
+ PJ_ASSERT_RETURN(status==PJ_SUCCESS, 1);
+
+ status = pj_sock_listen(sock, 5);
+ PJ_ASSERT_RETURN(status==PJ_SUCCESS, 1);
+
+ pj_bzero(&cb, sizeof(cb));
+ cb.on_accept_complete = &on_accept_complete;
+ cb.on_read_complete = &on_read_complete;
+
+ status = pj_ioqueue_register_sock(pool, ioqueue, sock, NULL, &cb, &key);
+ PJ_ASSERT_RETURN(status==PJ_SUCCESS, 1);
+
+ pj_ioqueue_op_key_init(&op_key, sizeof(op_key));
+ status = pj_ioqueue_accept(key, &op_key, &new_sock, NULL, NULL, NULL);
+ PJ_ASSERT_RETURN(status==PJ_EPENDING, 1);
+}
+