diff options
author | Mark Michelson <mmichelson@digium.com> | 2014-08-07 19:26:32 +0000 |
---|---|---|
committer | Mark Michelson <mmichelson@digium.com> | 2014-08-07 19:26:32 +0000 |
commit | 99d0bccd350cd42941c195667a5733ca6a4368a4 (patch) | |
tree | df35d3d85a37e598bbfd8c7604ab65248cca19df /main | |
parent | ea7d4ab09e05a2ebffc8ec81acb3c242d78a3732 (diff) |
Add support for RFC 4662 resource list subscriptions.
This commit adds the ability for a user to configure
a resource list in pjsip.conf. Subscribing to this
list simultaneously subscribes the subscriber to all
resources listed. This has the potential to reduce
the amount of SIP traffic when loads of subscribers
on a system attempt to subscribe to each others' states.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@420384 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main')
-rw-r--r-- | main/strings.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/main/strings.c b/main/strings.c index a65df39da..73892eb0a 100644 --- a/main/strings.c +++ b/main/strings.c @@ -195,3 +195,15 @@ void ast_str_container_remove(struct ao2_container *str_container, const char *r { ao2_find(str_container, remove, OBJ_SEARCH_KEY | OBJ_NODATA | OBJ_UNLINK); } + +char *ast_generate_random_string(char *buf, size_t size) +{ + int i; + + for (i = 0; i < size - 1; ++i) { + buf[i] = 'a' + (ast_random() % 26); + } + buf[i] = '\0'; + + return buf; +} |