mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 17:38:59 +00:00
use SWITCH_MESSAGE_INDICATE_UUID_CHANGE to change tokens in openzap when a uuid of FS changes OPENZAP-88
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@846 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
@@ -703,6 +703,20 @@ OZ_DECLARE(void) zap_channel_rotate_tokens(zap_channel_t *zchan)
|
||||
}
|
||||
}
|
||||
|
||||
OZ_DECLARE(void) zap_channel_replace_token(zap_channel_t *zchan, const char *old_token, const char *new_token)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (zchan->token_count) {
|
||||
for(i = 0; i < zchan->token_count; i++) {
|
||||
if (!strcmp(zchan->tokens[i], old_token)) {
|
||||
zap_copy_string(zchan->tokens[i], new_token, ZAP_TOKEN_STRLEN);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
OZ_DECLARE(zap_status_t) zap_channel_add_token(zap_channel_t *zchan, char *token, int end)
|
||||
{
|
||||
zap_status_t status = ZAP_FAIL;
|
||||
|
Reference in New Issue
Block a user