mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-02 19:16:15 +00:00
Compare commits
5 Commits
13.34
...
13.18.0-rc
Author | SHA1 | Date | |
---|---|---|---|
|
82cedfbcb3 | ||
|
576daa8a99 | ||
|
db233704f4 | ||
|
72bf65f44f | ||
|
d5d1e98fa4 |
1
.lastclean
Normal file
1
.lastclean
Normal file
@@ -0,0 +1 @@
|
||||
40
|
13
asterisk-13.18.0-rc2-summary.html
Normal file
13
asterisk-13.18.0-rc2-summary.html
Normal file
@@ -0,0 +1,13 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><title>Release Summary - asterisk-13.18.0-rc2</title><h1 align="center"><a name="top">Release Summary</a></h1><h3 align="center">asterisk-13.18.0-rc2</h3><h3 align="center">Date: 2017-10-25</h3><h3 align="center"><asteriskteam@digium.com></h3><hr><h2 align="center">Table of Contents</h2><ol>
|
||||
<li><a href="#summary">Summary</a></li>
|
||||
<li><a href="#contributors">Contributors</a></li>
|
||||
<li><a href="#closed_issues">Closed Issues</a></li>
|
||||
<li><a href="#diffstat">Diffstat</a></li>
|
||||
</ol><hr><a name="summary"><h2 align="center">Summary</h2></a><center><a href="#top">[Back to Top]</a></center><p>This release is a point release of an existing major version. The changes included were made to address problems that have been identified in this release series, or are minor, backwards compatible new features or improvements. Users should be able to safely upgrade to this version if this release series is already in use. Users considering upgrading from a previous version are strongly encouraged to review the UPGRADE.txt document as well as the CHANGES document for information about upgrading to this release series.</p><p>The data in this summary reflects changes that have been made since the previous release, asterisk-13.18.0-rc1.</p><hr><a name="contributors"><h2 align="center">Contributors</h2></a><center><a href="#top">[Back to Top]</a></center><p>This table lists the people who have submitted code, those that have tested patches, as well as those that reported issues on the issue tracker that were resolved in this release. For coders, the number is how many of their patches (of any size) were committed into this release. For testers, the number is the number of times their name was listed as assisting with testing a patch. Finally, for reporters, the number is the number of issues that they reported that were affected by commits that went into this release.</p><table width="100%" border="0">
|
||||
<tr><th width="33%">Coders</th><th width="33%">Testers</th><th width="33%">Reporters</th></tr>
|
||||
<tr valign="top"><td width="33%">1 Ben Ford <bford@digium.com><br/>1 Joshua Colp <jcolp@digium.com><br/></td><td width="33%"><td width="33%">1 Benjamin Keith Ford <bford@digium.com><br/>1 Ronald Raikes <reraikes@avweb.com><br/></td></tr>
|
||||
</table><hr><a name="closed_issues"><h2 align="center">Closed Issues</h2></a><center><a href="#top">[Back to Top]</a></center><p>This is a list of all issues from the issue tracker that were closed by changes that went into this release.</p><h3>Bug</h3><h4>Category: Resources/res_ari</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-27372">ASTERISK-27372</a>: ARI: Node ARI client broken in latest versions of 13 and 14<br/>Reported by: Benjamin Keith Ford<ul>
|
||||
<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=72bf65f44ff984162821c3cdd8e40a097e914bbd">[72bf65f44f]</a> Ben Ford -- http.c: Fix http header send content.</li>
|
||||
</ul><br><h4>Category: Resources/res_xmpp</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-27346">ASTERISK-27346</a>: res_xmpp: Crash if OAuth 2.0 is used before curl is loaded<br/>Reported by: Ronald Raikes<ul>
|
||||
<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=db233704f4ea85e01b1059044cbe9d81c6281c9e">[db233704f4]</a> Joshua Colp -- res_xmpp: Ensure the connection filter is available.</li>
|
||||
</ul><br><hr><a name="diffstat"><h2 align="center">Diffstat Results</h2></a><center><a href="#top">[Back to Top]</a></center><p>This is a summary of the changes to the source code that went into this release that was generated using the diffstat utility.</p><pre>0 files changed</pre><br></html>
|
89
asterisk-13.18.0-rc2-summary.txt
Normal file
89
asterisk-13.18.0-rc2-summary.txt
Normal file
@@ -0,0 +1,89 @@
|
||||
Release Summary
|
||||
|
||||
asterisk-13.18.0-rc2
|
||||
|
||||
Date: 2017-10-25
|
||||
|
||||
<asteriskteam@digium.com>
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Table of Contents
|
||||
|
||||
1. Summary
|
||||
2. Contributors
|
||||
3. Closed Issues
|
||||
4. Diffstat
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Summary
|
||||
|
||||
[Back to Top]
|
||||
|
||||
This release is a point release of an existing major version. The changes
|
||||
included were made to address problems that have been identified in this
|
||||
release series, or are minor, backwards compatible new features or
|
||||
improvements. Users should be able to safely upgrade to this version if
|
||||
this release series is already in use. Users considering upgrading from a
|
||||
previous version are strongly encouraged to review the UPGRADE.txt
|
||||
document as well as the CHANGES document for information about upgrading
|
||||
to this release series.
|
||||
|
||||
The data in this summary reflects changes that have been made since the
|
||||
previous release, asterisk-13.18.0-rc1.
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Contributors
|
||||
|
||||
[Back to Top]
|
||||
|
||||
This table lists the people who have submitted code, those that have
|
||||
tested patches, as well as those that reported issues on the issue tracker
|
||||
that were resolved in this release. For coders, the number is how many of
|
||||
their patches (of any size) were committed into this release. For testers,
|
||||
the number is the number of times their name was listed as assisting with
|
||||
testing a patch. Finally, for reporters, the number is the number of
|
||||
issues that they reported that were affected by commits that went into
|
||||
this release.
|
||||
|
||||
Coders Testers Reporters
|
||||
1 Ben Ford 1 Benjamin Keith Ford
|
||||
1 Joshua Colp 1 Ronald Raikes
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Closed Issues
|
||||
|
||||
[Back to Top]
|
||||
|
||||
This is a list of all issues from the issue tracker that were closed by
|
||||
changes that went into this release.
|
||||
|
||||
Bug
|
||||
|
||||
Category: Resources/res_ari
|
||||
|
||||
ASTERISK-27372: ARI: Node ARI client broken in latest versions of 13 and
|
||||
14
|
||||
Reported by: Benjamin Keith Ford
|
||||
* [72bf65f44f] Ben Ford -- http.c: Fix http header send content.
|
||||
|
||||
Category: Resources/res_xmpp
|
||||
|
||||
ASTERISK-27346: res_xmpp: Crash if OAuth 2.0 is used before curl is loaded
|
||||
Reported by: Ronald Raikes
|
||||
* [db233704f4] Joshua Colp -- res_xmpp: Ensure the connection filter is
|
||||
available.
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Diffstat Results
|
||||
|
||||
[Back to Top]
|
||||
|
||||
This is a summary of the changes to the source code that went into this
|
||||
release that was generated using the diffstat utility.
|
||||
|
||||
0 files changed
|
44
contrib/realtime/mssql/mssql_cdr.sql
Normal file
44
contrib/realtime/mssql/mssql_cdr.sql
Normal file
@@ -0,0 +1,44 @@
|
||||
BEGIN TRANSACTION;
|
||||
|
||||
CREATE TABLE alembic_version (
|
||||
version_num VARCHAR(32) NOT NULL
|
||||
);
|
||||
|
||||
GO
|
||||
|
||||
-- Running upgrade -> 210693f3123d
|
||||
|
||||
CREATE TABLE cdr (
|
||||
accountcode VARCHAR(20) NULL,
|
||||
src VARCHAR(80) NULL,
|
||||
dst VARCHAR(80) NULL,
|
||||
dcontext VARCHAR(80) NULL,
|
||||
clid VARCHAR(80) NULL,
|
||||
channel VARCHAR(80) NULL,
|
||||
dstchannel VARCHAR(80) NULL,
|
||||
lastapp VARCHAR(80) NULL,
|
||||
lastdata VARCHAR(80) NULL,
|
||||
start DATETIME NULL,
|
||||
answer DATETIME NULL,
|
||||
[end] DATETIME NULL,
|
||||
duration INTEGER NULL,
|
||||
billsec INTEGER NULL,
|
||||
disposition VARCHAR(45) NULL,
|
||||
amaflags VARCHAR(45) NULL,
|
||||
userfield VARCHAR(256) NULL,
|
||||
uniqueid VARCHAR(150) NULL,
|
||||
linkedid VARCHAR(150) NULL,
|
||||
peeraccount VARCHAR(20) NULL,
|
||||
sequence INTEGER NULL
|
||||
);
|
||||
|
||||
GO
|
||||
|
||||
INSERT INTO alembic_version (version_num) VALUES ('210693f3123d');
|
||||
|
||||
GO
|
||||
|
||||
COMMIT;
|
||||
|
||||
GO
|
||||
|
1817
contrib/realtime/mssql/mssql_config.sql
Normal file
1817
contrib/realtime/mssql/mssql_config.sql
Normal file
File diff suppressed because it is too large
Load Diff
54
contrib/realtime/mssql/mssql_voicemail.sql
Normal file
54
contrib/realtime/mssql/mssql_voicemail.sql
Normal file
@@ -0,0 +1,54 @@
|
||||
BEGIN TRANSACTION;
|
||||
|
||||
CREATE TABLE alembic_version (
|
||||
version_num VARCHAR(32) NOT NULL
|
||||
);
|
||||
|
||||
GO
|
||||
|
||||
-- Running upgrade -> a2e9769475e
|
||||
|
||||
CREATE TABLE voicemail_messages (
|
||||
dir VARCHAR(255) NOT NULL,
|
||||
msgnum INTEGER NOT NULL,
|
||||
context VARCHAR(80) NULL,
|
||||
macrocontext VARCHAR(80) NULL,
|
||||
callerid VARCHAR(80) NULL,
|
||||
origtime INTEGER NULL,
|
||||
duration INTEGER NULL,
|
||||
recording IMAGE NULL,
|
||||
flag VARCHAR(30) NULL,
|
||||
category VARCHAR(30) NULL,
|
||||
mailboxuser VARCHAR(30) NULL,
|
||||
mailboxcontext VARCHAR(30) NULL,
|
||||
msg_id VARCHAR(40) NULL
|
||||
);
|
||||
|
||||
GO
|
||||
|
||||
ALTER TABLE voicemail_messages ADD CONSTRAINT voicemail_messages_dir_msgnum PRIMARY KEY (dir, msgnum);
|
||||
|
||||
GO
|
||||
|
||||
CREATE INDEX voicemail_messages_dir ON voicemail_messages (dir);
|
||||
|
||||
GO
|
||||
|
||||
INSERT INTO alembic_version (version_num) VALUES ('a2e9769475e');
|
||||
|
||||
GO
|
||||
|
||||
-- Running upgrade a2e9769475e -> 39428242f7f5
|
||||
|
||||
ALTER TABLE voicemail_messages ALTER COLUMN recording IMAGE;
|
||||
|
||||
GO
|
||||
|
||||
UPDATE alembic_version SET version_num='39428242f7f5' WHERE alembic_version.version_num = 'a2e9769475e';
|
||||
|
||||
GO
|
||||
|
||||
COMMIT;
|
||||
|
||||
GO
|
||||
|
32
contrib/realtime/mysql/mysql_cdr.sql
Normal file
32
contrib/realtime/mysql/mysql_cdr.sql
Normal file
@@ -0,0 +1,32 @@
|
||||
CREATE TABLE alembic_version (
|
||||
version_num VARCHAR(32) NOT NULL
|
||||
);
|
||||
|
||||
-- Running upgrade -> 210693f3123d
|
||||
|
||||
CREATE TABLE cdr (
|
||||
accountcode VARCHAR(20),
|
||||
src VARCHAR(80),
|
||||
dst VARCHAR(80),
|
||||
dcontext VARCHAR(80),
|
||||
clid VARCHAR(80),
|
||||
channel VARCHAR(80),
|
||||
dstchannel VARCHAR(80),
|
||||
lastapp VARCHAR(80),
|
||||
lastdata VARCHAR(80),
|
||||
start DATETIME,
|
||||
answer DATETIME,
|
||||
end DATETIME,
|
||||
duration INTEGER,
|
||||
billsec INTEGER,
|
||||
disposition VARCHAR(45),
|
||||
amaflags VARCHAR(45),
|
||||
userfield VARCHAR(256),
|
||||
uniqueid VARCHAR(150),
|
||||
linkedid VARCHAR(150),
|
||||
peeraccount VARCHAR(20),
|
||||
sequence INTEGER
|
||||
);
|
||||
|
||||
INSERT INTO alembic_version (version_num) VALUES ('210693f3123d');
|
||||
|
1088
contrib/realtime/mysql/mysql_config.sql
Normal file
1088
contrib/realtime/mysql/mysql_config.sql
Normal file
File diff suppressed because it is too large
Load Diff
34
contrib/realtime/mysql/mysql_voicemail.sql
Normal file
34
contrib/realtime/mysql/mysql_voicemail.sql
Normal file
@@ -0,0 +1,34 @@
|
||||
CREATE TABLE alembic_version (
|
||||
version_num VARCHAR(32) NOT NULL
|
||||
);
|
||||
|
||||
-- Running upgrade -> a2e9769475e
|
||||
|
||||
CREATE TABLE voicemail_messages (
|
||||
dir VARCHAR(255) NOT NULL,
|
||||
msgnum INTEGER NOT NULL,
|
||||
context VARCHAR(80),
|
||||
macrocontext VARCHAR(80),
|
||||
callerid VARCHAR(80),
|
||||
origtime INTEGER,
|
||||
duration INTEGER,
|
||||
recording BLOB,
|
||||
flag VARCHAR(30),
|
||||
category VARCHAR(30),
|
||||
mailboxuser VARCHAR(30),
|
||||
mailboxcontext VARCHAR(30),
|
||||
msg_id VARCHAR(40)
|
||||
);
|
||||
|
||||
ALTER TABLE voicemail_messages ADD CONSTRAINT voicemail_messages_dir_msgnum PRIMARY KEY (dir, msgnum);
|
||||
|
||||
CREATE INDEX voicemail_messages_dir ON voicemail_messages (dir);
|
||||
|
||||
INSERT INTO alembic_version (version_num) VALUES ('a2e9769475e');
|
||||
|
||||
-- Running upgrade a2e9769475e -> 39428242f7f5
|
||||
|
||||
ALTER TABLE voicemail_messages MODIFY recording BLOB(4294967295) NULL;
|
||||
|
||||
UPDATE alembic_version SET version_num='39428242f7f5' WHERE alembic_version.version_num = 'a2e9769475e';
|
||||
|
38
contrib/realtime/oracle/oracle_cdr.sql
Normal file
38
contrib/realtime/oracle/oracle_cdr.sql
Normal file
@@ -0,0 +1,38 @@
|
||||
CREATE TABLE alembic_version (
|
||||
version_num VARCHAR2(32 CHAR) NOT NULL
|
||||
)
|
||||
|
||||
/
|
||||
|
||||
-- Running upgrade -> 210693f3123d
|
||||
|
||||
CREATE TABLE cdr (
|
||||
accountcode VARCHAR2(20 CHAR),
|
||||
src VARCHAR2(80 CHAR),
|
||||
dst VARCHAR2(80 CHAR),
|
||||
dcontext VARCHAR2(80 CHAR),
|
||||
clid VARCHAR2(80 CHAR),
|
||||
channel VARCHAR2(80 CHAR),
|
||||
dstchannel VARCHAR2(80 CHAR),
|
||||
lastapp VARCHAR2(80 CHAR),
|
||||
lastdata VARCHAR2(80 CHAR),
|
||||
"start" DATE,
|
||||
answer DATE,
|
||||
end DATE,
|
||||
duration INTEGER,
|
||||
billsec INTEGER,
|
||||
disposition VARCHAR2(45 CHAR),
|
||||
amaflags VARCHAR2(45 CHAR),
|
||||
userfield VARCHAR2(256 CHAR),
|
||||
uniqueid VARCHAR2(150 CHAR),
|
||||
linkedid VARCHAR2(150 CHAR),
|
||||
peeraccount VARCHAR2(20 CHAR),
|
||||
sequence INTEGER
|
||||
)
|
||||
|
||||
/
|
||||
|
||||
INSERT INTO alembic_version (version_num) VALUES ('210693f3123d')
|
||||
|
||||
/
|
||||
|
1791
contrib/realtime/oracle/oracle_config.sql
Normal file
1791
contrib/realtime/oracle/oracle_config.sql
Normal file
File diff suppressed because it is too large
Load Diff
48
contrib/realtime/oracle/oracle_voicemail.sql
Normal file
48
contrib/realtime/oracle/oracle_voicemail.sql
Normal file
@@ -0,0 +1,48 @@
|
||||
CREATE TABLE alembic_version (
|
||||
version_num VARCHAR2(32 CHAR) NOT NULL
|
||||
)
|
||||
|
||||
/
|
||||
|
||||
-- Running upgrade -> a2e9769475e
|
||||
|
||||
CREATE TABLE voicemail_messages (
|
||||
dir VARCHAR2(255 CHAR) NOT NULL,
|
||||
msgnum INTEGER NOT NULL,
|
||||
context VARCHAR2(80 CHAR),
|
||||
macrocontext VARCHAR2(80 CHAR),
|
||||
callerid VARCHAR2(80 CHAR),
|
||||
origtime INTEGER,
|
||||
duration INTEGER,
|
||||
recording BLOB,
|
||||
flag VARCHAR2(30 CHAR),
|
||||
category VARCHAR2(30 CHAR),
|
||||
mailboxuser VARCHAR2(30 CHAR),
|
||||
mailboxcontext VARCHAR2(30 CHAR),
|
||||
msg_id VARCHAR2(40 CHAR)
|
||||
)
|
||||
|
||||
/
|
||||
|
||||
ALTER TABLE voicemail_messages ADD CONSTRAINT voicemail_messages_dir_msgnum PRIMARY KEY (dir, msgnum)
|
||||
|
||||
/
|
||||
|
||||
CREATE INDEX voicemail_messages_dir ON voicemail_messages (dir)
|
||||
|
||||
/
|
||||
|
||||
INSERT INTO alembic_version (version_num) VALUES ('a2e9769475e')
|
||||
|
||||
/
|
||||
|
||||
-- Running upgrade a2e9769475e -> 39428242f7f5
|
||||
|
||||
ALTER TABLE voicemail_messages MODIFY recording BLOB
|
||||
|
||||
/
|
||||
|
||||
UPDATE alembic_version SET version_num='39428242f7f5' WHERE alembic_version.version_num = 'a2e9769475e'
|
||||
|
||||
/
|
||||
|
36
contrib/realtime/postgresql/postgresql_cdr.sql
Normal file
36
contrib/realtime/postgresql/postgresql_cdr.sql
Normal file
@@ -0,0 +1,36 @@
|
||||
BEGIN;
|
||||
|
||||
CREATE TABLE alembic_version (
|
||||
version_num VARCHAR(32) NOT NULL
|
||||
);
|
||||
|
||||
-- Running upgrade -> 210693f3123d
|
||||
|
||||
CREATE TABLE cdr (
|
||||
accountcode VARCHAR(20),
|
||||
src VARCHAR(80),
|
||||
dst VARCHAR(80),
|
||||
dcontext VARCHAR(80),
|
||||
clid VARCHAR(80),
|
||||
channel VARCHAR(80),
|
||||
dstchannel VARCHAR(80),
|
||||
lastapp VARCHAR(80),
|
||||
lastdata VARCHAR(80),
|
||||
start TIMESTAMP WITHOUT TIME ZONE,
|
||||
answer TIMESTAMP WITHOUT TIME ZONE,
|
||||
"end" TIMESTAMP WITHOUT TIME ZONE,
|
||||
duration INTEGER,
|
||||
billsec INTEGER,
|
||||
disposition VARCHAR(45),
|
||||
amaflags VARCHAR(45),
|
||||
userfield VARCHAR(256),
|
||||
uniqueid VARCHAR(150),
|
||||
linkedid VARCHAR(150),
|
||||
peeraccount VARCHAR(20),
|
||||
sequence INTEGER
|
||||
);
|
||||
|
||||
INSERT INTO alembic_version (version_num) VALUES ('210693f3123d');
|
||||
|
||||
COMMIT;
|
||||
|
1172
contrib/realtime/postgresql/postgresql_config.sql
Normal file
1172
contrib/realtime/postgresql/postgresql_config.sql
Normal file
File diff suppressed because it is too large
Load Diff
38
contrib/realtime/postgresql/postgresql_voicemail.sql
Normal file
38
contrib/realtime/postgresql/postgresql_voicemail.sql
Normal file
@@ -0,0 +1,38 @@
|
||||
BEGIN;
|
||||
|
||||
CREATE TABLE alembic_version (
|
||||
version_num VARCHAR(32) NOT NULL
|
||||
);
|
||||
|
||||
-- Running upgrade -> a2e9769475e
|
||||
|
||||
CREATE TABLE voicemail_messages (
|
||||
dir VARCHAR(255) NOT NULL,
|
||||
msgnum INTEGER NOT NULL,
|
||||
context VARCHAR(80),
|
||||
macrocontext VARCHAR(80),
|
||||
callerid VARCHAR(80),
|
||||
origtime INTEGER,
|
||||
duration INTEGER,
|
||||
recording BYTEA,
|
||||
flag VARCHAR(30),
|
||||
category VARCHAR(30),
|
||||
mailboxuser VARCHAR(30),
|
||||
mailboxcontext VARCHAR(30),
|
||||
msg_id VARCHAR(40)
|
||||
);
|
||||
|
||||
ALTER TABLE voicemail_messages ADD CONSTRAINT voicemail_messages_dir_msgnum PRIMARY KEY (dir, msgnum);
|
||||
|
||||
CREATE INDEX voicemail_messages_dir ON voicemail_messages (dir);
|
||||
|
||||
INSERT INTO alembic_version (version_num) VALUES ('a2e9769475e');
|
||||
|
||||
-- Running upgrade a2e9769475e -> 39428242f7f5
|
||||
|
||||
ALTER TABLE voicemail_messages ALTER COLUMN recording TYPE BYTEA;
|
||||
|
||||
UPDATE alembic_version SET version_num='39428242f7f5' WHERE alembic_version.version_num = 'a2e9769475e';
|
||||
|
||||
COMMIT;
|
||||
|
39
main/http.c
39
main/http.c
@@ -451,9 +451,12 @@ void ast_http_send(struct ast_tcptls_session_instance *ser,
|
||||
struct timeval now = ast_tvnow();
|
||||
struct ast_tm tm;
|
||||
char timebuf[80];
|
||||
char buf[256];
|
||||
int len;
|
||||
int content_length = 0;
|
||||
int close_connection;
|
||||
struct ast_str *server_header_field = ast_str_create(MAX_SERVER_NAME_LENGTH);
|
||||
int send_content;
|
||||
|
||||
if (!ser || !ser->f || !server_header_field) {
|
||||
/* The connection is not open. */
|
||||
@@ -504,6 +507,8 @@ void ast_http_send(struct ast_tcptls_session_instance *ser,
|
||||
lseek(fd, 0, SEEK_SET);
|
||||
}
|
||||
|
||||
send_content = method != AST_HTTP_HEAD || status_code >= 400;
|
||||
|
||||
/* send http header */
|
||||
if (fprintf(ser->f,
|
||||
"HTTP/1.1 %d %s\r\n"
|
||||
@@ -513,46 +518,30 @@ void ast_http_send(struct ast_tcptls_session_instance *ser,
|
||||
"%s"
|
||||
"%s"
|
||||
"Content-Length: %d\r\n"
|
||||
"\r\n",
|
||||
"\r\n"
|
||||
"%s",
|
||||
status_code, status_title ? status_title : "OK",
|
||||
ast_str_buffer(server_header_field),
|
||||
timebuf,
|
||||
close_connection ? "Connection: close\r\n" : "",
|
||||
static_content ? "" : "Cache-Control: no-cache, no-store\r\n",
|
||||
http_header ? ast_str_buffer(http_header) : "",
|
||||
content_length
|
||||
content_length,
|
||||
send_content && out && ast_str_strlen(out) ? ast_str_buffer(out) : ""
|
||||
) <= 0) {
|
||||
ast_debug(1, "fprintf() failed: %s\n", strerror(errno));
|
||||
close_connection = 1;
|
||||
}
|
||||
|
||||
/* send content */
|
||||
if (!close_connection && (method != AST_HTTP_HEAD || status_code >= 400)) {
|
||||
if (out && ast_str_strlen(out)) {
|
||||
} else if (send_content && fd) {
|
||||
/* send file content */
|
||||
while ((len = read(fd, buf, sizeof(buf))) > 0) {
|
||||
/*
|
||||
* NOTE: Because ser->f is a non-standard FILE *, fwrite() will probably not
|
||||
* behave exactly as documented.
|
||||
*/
|
||||
if (fwrite(ast_str_buffer(out), ast_str_strlen(out), 1, ser->f) != 1) {
|
||||
if (fwrite(buf, len, 1, ser->f) != 1) {
|
||||
ast_debug(1, "fwrite() failed: %s\n", strerror(errno));
|
||||
close_connection = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (fd) {
|
||||
char buf[256];
|
||||
int len;
|
||||
|
||||
while ((len = read(fd, buf, sizeof(buf))) > 0) {
|
||||
/*
|
||||
* NOTE: Because ser->f is a non-standard FILE *, fwrite() will probably not
|
||||
* behave exactly as documented.
|
||||
*/
|
||||
if (fwrite(buf, len, 1, ser->f) != 1) {
|
||||
ast_debug(1, "fwrite() failed: %s\n", strerror(errno));
|
||||
close_connection = 1;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -3654,13 +3654,6 @@ static int xmpp_client_reconnect(struct ast_xmpp_client *client)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!ast_strlen_zero(clientcfg->refresh_token)) {
|
||||
ast_debug(2, "Obtaining OAuth access token for client '%s'\n", client->name);
|
||||
if (fetch_access_token(clientcfg)) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
ast_xmpp_client_disconnect(client);
|
||||
|
||||
client->timeout = 50;
|
||||
@@ -3671,6 +3664,13 @@ static int xmpp_client_reconnect(struct ast_xmpp_client *client)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!ast_strlen_zero(clientcfg->refresh_token)) {
|
||||
ast_debug(2, "Obtaining OAuth access token for client '%s'\n", client->name);
|
||||
if (fetch_access_token(clientcfg)) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
/* If it's a component connect to user otherwise connect to server */
|
||||
res = iks_connect_via(client->parser, S_OR(clientcfg->server, client->jid->server), clientcfg->port,
|
||||
ast_test_flag(&clientcfg->flags, XMPP_COMPONENT) ? clientcfg->user : client->jid->server);
|
||||
|
Reference in New Issue
Block a user