Skip to content

Commit e285e05

Browse files
committed
Changed version to 0.8.0
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@1576 74dad513-b988-da41-8d7b-12977e46ad98
1 parent da9080f commit e285e05

File tree

3 files changed

+63
-4
lines changed

3 files changed

+63
-4
lines changed

pjlib/include/pj/config_site_sample.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
# define PJ_HAS_FLOATING_POINT 0
1818

1919
# define PJMEDIA_HAS_G711_PLC 0
20-
# define PJMEDIA_HAS_SMALL_FILTER 1
21-
# define PJMEDIA_HAS_LARGE_FILTER 0
20+
//# define PJMEDIA_HAS_SMALL_FILTER 1
21+
//# define PJMEDIA_HAS_LARGE_FILTER 0
2222
# define PJMEDIA_HAS_L16_CODEC 0
2323
/*# define PJMEDIA_HAS_GSM_CODEC 0*/
2424
/*# define PJMEDIA_HAS_ILBC_CODEC 0*/

pjlib/src/pj/config.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include <pj/ioqueue.h>
2222

2323
static const char *id = "config.c";
24-
PJ_DEF_DATA(const char*) PJ_VERSION = "0.7.0-trunk";
24+
PJ_DEF_DATA(const char*) PJ_VERSION = "0.8.0";
2525

2626
/*
2727
* Get PJLIB version string.

pjsip-apps/src/samples/debug.c

+60-1
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,63 @@
2727
* E.g.:
2828
* #include "playfile.c"
2929
*/
30-
#include "aectest.c"
30+
//#include "aectest.c"
31+
#include <pjlib.h>
32+
33+
34+
static void on_accept_complete(pj_ioqueue_key_t *key,
35+
pj_ioqueue_op_key_t *op_key,
36+
pj_sock_t sock,
37+
pj_status_t status)
38+
{
39+
}
40+
41+
static void on_read_complete(pj_ioqueue_key_t *key,
42+
pj_ioqueue_op_key_t *op_key,
43+
pj_ssize_t bytes_read)
44+
{
45+
}
46+
47+
48+
int main()
49+
{
50+
pj_status_t status;
51+
pj_caching_pool cp;
52+
pj_pool_t *pool;
53+
pj_sock_t sock, new_sock;
54+
pj_ioqueue_t *ioqueue;
55+
pj_ioqueue_op_key_t op_key;
56+
pj_ioqueue_callback cb;
57+
pj_ioqueue_key_t *key;
58+
59+
status = pj_init();
60+
PJ_ASSERT_RETURN(status==PJ_SUCCESS, 1);
61+
62+
pj_caching_pool_init(&cp, NULL, 0);
63+
pool = pj_pool_create(&cp.factory, "app", 1000, 1000, NULL);
64+
65+
status = pj_sock_socket(pj_AF_INET(), pj_SOCK_STREAM(), 0, &sock);
66+
PJ_ASSERT_RETURN(status==PJ_SUCCESS, 1);
67+
68+
status = pj_sock_bind_in(sock, 0, 80);
69+
if (status != PJ_SUCCESS)
70+
return 1;
71+
72+
status = pj_ioqueue_create(pool, PJ_IOQUEUE_MAX_HANDLES, &ioqueue);
73+
PJ_ASSERT_RETURN(status==PJ_SUCCESS, 1);
74+
75+
status = pj_sock_listen(sock, 5);
76+
PJ_ASSERT_RETURN(status==PJ_SUCCESS, 1);
77+
78+
pj_bzero(&cb, sizeof(cb));
79+
cb.on_accept_complete = &on_accept_complete;
80+
cb.on_read_complete = &on_read_complete;
81+
82+
status = pj_ioqueue_register_sock(pool, ioqueue, sock, NULL, &cb, &key);
83+
PJ_ASSERT_RETURN(status==PJ_SUCCESS, 1);
84+
85+
pj_ioqueue_op_key_init(&op_key, sizeof(op_key));
86+
status = pj_ioqueue_accept(key, &op_key, &new_sock, NULL, NULL, NULL);
87+
PJ_ASSERT_RETURN(status==PJ_EPENDING, 1);
88+
}
89+

0 commit comments

Comments
 (0)