diff options
author | Benny Prijono <bennylp@teluu.com> | 2007-03-20 08:44:26 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2007-03-20 08:44:26 +0000 |
commit | 64942da06cce3089be7faa5ae609d5431d06efb8 (patch) | |
tree | 59437308405603551654518b4aa42e94611b5317 /pjnath/src/pjnath/stun_msg.c | |
parent | ddd77d225ea62a6200a6a215655a31f680b15fe8 (diff) |
--
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1085 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjnath/src/pjnath/stun_msg.c')
-rw-r--r-- | pjnath/src/pjnath/stun_msg.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/pjnath/src/pjnath/stun_msg.c b/pjnath/src/pjnath/stun_msg.c index b361898f..058ce833 100644 --- a/pjnath/src/pjnath/stun_msg.c +++ b/pjnath/src/pjnath/stun_msg.c @@ -873,6 +873,23 @@ pj_stun_empty_attr_create(pj_pool_t *pool, } +/* + * Create STUN empty attribute and add the attribute to the message. + */ +PJ_DEF(pj_status_t) pj_stun_msg_add_empty_attr( pj_pool_t *pool, + pj_stun_msg *msg, + int attr_type) +{ + pj_stun_empty_attr *attr = NULL; + pj_status_t status; + + status = pj_stun_empty_attr_create(pool, attr_type, &attr); + if (status != PJ_SUCCESS) + return status; + + return pj_stun_msg_add_attr(msg, &attr->hdr); +} + static pj_status_t decode_empty_attr(pj_pool_t *pool, const pj_uint8_t *buf, void **p_attr) |