mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-21 09:10:36 +00:00
Build System: Enable python3 compatibility.
* Consistently use spaces in rest-api-templates/asterisk_processor.py. * Exclude third-party from docs/full-en_US.xml. * Add docs/full-en_US.xml to .gitignore. * Use list() to convert python3 view. * Use python3 print function. * Replace cmp() with equivalent equation. * Replace reference to out of scope subtype variable with name parameter. * Use unescaping triple bracket notation in mustache templates where needed. This causes behavior of Python2 to be maintained when using Python3. * Fix references to has_websocket / is_websocket in res_ari_resource.c.mustache. * Update calculation of has_websocket to use any(). * Use unicode mode for writing output file in transform.py. * Replace 'from swagger_model import *' with explicit import of required symbols. I have not tested spandspflow2pcap.py or voicemailpwcheck.py, only the print syntax has been fixed. Change-Id: If5c5b556a2800d41a3e2cfef080ac2e151178c33
This commit is contained in:
@@ -55,7 +55,7 @@
|
||||
#if defined(AST_DEVMODE)
|
||||
#include "ari/ari_model_validators.h"
|
||||
#endif
|
||||
{{^has_websocket}}
|
||||
{{#has_websocket}}
|
||||
{{! Only include http_websocket if necessary. Otherwise we'll do a lot of
|
||||
* unnecessary optional_api intialization, which makes optional_api harder
|
||||
* to debug
|
||||
@@ -278,7 +278,7 @@ static int load_module(void)
|
||||
|
||||
{{#apis}}
|
||||
{{#operations}}
|
||||
{{#has_websocket}}
|
||||
{{#is_websocket}}
|
||||
struct ast_websocket_protocol *protocol;
|
||||
|
||||
if (ast_ari_websocket_{{c_name}}_{{c_nickname}}_init() == -1) {
|
||||
@@ -300,8 +300,6 @@ static int load_module(void)
|
||||
}
|
||||
protocol->session_attempted = ast_ari_{{c_name}}_{{c_nickname}}_ws_attempted_cb;
|
||||
protocol->session_established = ast_ari_{{c_name}}_{{c_nickname}}_ws_established_cb;
|
||||
{{/has_websocket}}
|
||||
{{#is_websocket}}
|
||||
res |= ast_websocket_server_add_protocol2({{full_name}}.ws_server, protocol);
|
||||
{{/is_websocket}}
|
||||
{{/operations}}
|
||||
|
||||
Reference in New Issue
Block a user