summaryrefslogtreecommitdiffstats
path: root/main/asterisk/ASTERISK-13456.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/asterisk/ASTERISK-13456.patch')
-rw-r--r--main/asterisk/ASTERISK-13456.patch8
1 files changed, 4 insertions, 4 deletions
diff --git a/main/asterisk/ASTERISK-13456.patch b/main/asterisk/ASTERISK-13456.patch
index d6e579ba0..b796c58f0 100644
--- a/main/asterisk/ASTERISK-13456.patch
+++ b/main/asterisk/ASTERISK-13456.patch
@@ -282,11 +282,11 @@ index 41fb935..ad8da22 100644
- if (!ast_strlen_zero(callback)) { /* build string from peer info */
+ if (!ast_strlen_zero(peer->callback)) { /* build string from peer info */
char *reg_string;
-- if (asprintf(&reg_string, "%s?%s:%s@%s/%s", peer->name, peer->username, !ast_strlen_zero(peer->remotesecret) ? peer->remotesecret : peer->secret, peer->tohost, callback) < 0) {
-+ if (asprintf(&reg_string, "%s?%s:%s@%s/%s", peer->name, peer->username, !ast_strlen_zero(peer->remotesecret) ? peer->remotesecret : peer->secret, peer->tohost, peer->callback) < 0) {
- ast_log(LOG_WARNING, "asprintf() failed: %s\n", strerror(errno));
- } else if (reg_string) {
+- if (ast_asprintf(&reg_string, "%s?%s:%s@%s/%s", peer->name, peer->username, !ast_strlen_zero(peer->remotesecret) ? peer->remotesecret : peer->secret, peer->tohost, callback) >= 0) {
++ if (ast_asprintf(&reg_string, "%s?%s:%s@%s/%s", peer->name, peer->username, !ast_strlen_zero(peer->remotesecret) ? peer->remotesecret : peer->secret, peer->tohost, peer->callback) >= 0) {
sip_register(reg_string, 0); /* XXX TODO: count in registry_count */
+ ast_free(reg_string);
+ }
@@ -30116,6 +30175,8 @@ static int reload_config(enum channelreloadreason reason)
/* Release configuration from memory */
ast_config_destroy(cfg);