- seven@seven:~/workspace/blade/docker/freeswitch-lab-docker/freeswitch-lab/src/mod/asr_tts/mod_gcloud$ git diff .
- diff --git a/src/mod/asr_tts/mod_gcloud/Makefile.am b/src/mod/asr_tts/mod_gcloud/Makefile.am
- index c005450cff..e4c99b97d5 100644
- --- a/src/mod/asr_tts/mod_gcloud/Makefile.am
- +++ b/src/mod/asr_tts/mod_gcloud/Makefile.am
- @@ -17,7 +17,7 @@ GOOGLEAPIS_CCS = $(GOOGLEAPIS_API_CCS) $(GOOGLEAPIS_RPC_CCS) \
- $(GOOGLEAPIS_LONGRUNNING_CCS) $(GOOGLEAPIS_SPEECH_CCS) $(GOOGLEAPIS_TYPE_CCS)
- mod_LTLIBRARIES = mod_gcloud.la
- -mod_gcloud_la_SOURCES = gcloud_dialog_rest.c curl_req.c gcloud_dialog_grpc.cc mod_gcloud.c \
- +mod_gcloud_la_SOURCES = gcloud_dialog_rest.c curl_req.c tt.cc mod_gcloud.c \
- google/longrunning/operations.grpc.pb.cc \
- google/longrunning/operations.pb.cc \
- google/type/latlng.grpc.pb.cc \
- diff --git a/src/mod/asr_tts/mod_gcloud/mod_gcloud.c b/src/mod/asr_tts/mod_gcloud/mod_gcloud.c
- index 2ce9ce6520..84e9df9e65 100644
- --- a/src/mod/asr_tts/mod_gcloud/mod_gcloud.c
- +++ b/src/mod/asr_tts/mod_gcloud/mod_gcloud.c
- @@ -203,6 +203,13 @@ SWITCH_STANDARD_API(token_function)
- }
- +SWITCH_STANDARD_API(tt_function)
- +{
- + tt();
- + return SWITCH_STATUS_SUCCESS;
- +}
- +
- +
- SWITCH_MODULE_LOAD_FUNCTION(gcloud_load)
- {
- switch_api_interface_t *api_interface;
- @@ -225,9 +232,11 @@ SWITCH_MODULE_LOAD_FUNCTION(gcloud_load)
- }
- SWITCH_ADD_API(api_interface, "gcloud_token", "GCloud token request", token_function, "");
- +switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "tttt\n");
- + SWITCH_ADD_API(api_interface, "tt", "tt", tt_function, "");
- gcloud_dialog_rest_load(module_interface, pool);
- - gcloud_dialog_grpc_load(module_interface, pool);
- + // gcloud_dialog_grpc_load(module_interface, pool);
- /* indicate that the module should continue to be loaded */
- return SWITCH_STATUS_SUCCESS;
- @@ -238,7 +247,7 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(gcloud_shutdown)
- switch_scheduler_del_task_group("gcloud");
- gcloud_dialog_rest_shutdown();
- - gcloud_dialog_grpc_shutdown();
- + // gcloud_dialog_grpc_shutdown();
- return SWITCH_STATUS_UNLOAD;
- }
- diff --git a/src/mod/asr_tts/mod_gcloud/mod_gcloud.h b/src/mod/asr_tts/mod_gcloud/mod_gcloud.h
- index 6afb615546..ff36767c9d 100644
- --- a/src/mod/asr_tts/mod_gcloud/mod_gcloud.h
- +++ b/src/mod/asr_tts/mod_gcloud/mod_gcloud.h
- @@ -32,8 +32,10 @@ SWITCH_DECLARE(switch_status_t) gcloud_dialog_rest_shutdown SWITCH_MODULE_SHUTDO
- extern "C" {
- #endif
- -SWITCH_DECLARE(switch_status_t) gcloud_dialog_grpc_load SWITCH_MODULE_LOAD_ARGS;
- -SWITCH_DECLARE(switch_status_t) gcloud_dialog_grpc_shutdown SWITCH_MODULE_SHUTDOWN_ARGS;
- +// SWITCH_DECLARE(switch_status_t) gcloud_dialog_grpc_load SWITCH_MODULE_LOAD_ARGS;
- +// SWITCH_DECLARE(switch_status_t) gcloud_dialog_grpc_shutdown SWITCH_MODULE_SHUTDOWN_ARGS;
- +
- +SWITCH_DECLARE(int) tt();
- #ifdef __cplusplus
- }
- diff --git a/src/mod/asr_tts/mod_gcloud/t.mk b/src/mod/asr_tts/mod_gcloud/t.mk
- index 643d5b3b3b..ecbabdbd67 100644
- --- a/src/mod/asr_tts/mod_gcloud/t.mk
- +++ b/src/mod/asr_tts/mod_gcloud/t.mk
- @@ -9,8 +9,10 @@ GOOGLEAPIS_SPEECH_CCS = $(shell find \
- $(GOOGLEAPIS_GENS_PATH)/google/cloud/dialogflow -name '*.pb.cc')
- GOOGLEAPIS_LONGRUNNING_CCS = $(shell find \
- $(GOOGLEAPIS_GENS_PATH)/google/longrunning -name '*.pb.cc')
- +GOOGLEAPIS_LOGGING_CCS = $(shell find \
- + $(GOOGLEAPIS_GENS_PATH)/google/logging -name '*.pb.cc')
- GOOGLEAPIS_CCS = $(GOOGLEAPIS_API_CCS) $(GOOGLEAPIS_RPC_CCS) \
- - $(GOOGLEAPIS_LONGRUNNING_CCS) $(GOOGLEAPIS_SPEECH_CCS) $(GOOGLEAPIS_TYPE_CCS)
- + $(GOOGLEAPIS_LONGRUNNING_CCS) $(GOOGLEAPIS_SPEECH_CCS) $(GOOGLEAPIS_TYPE_CCS) $(GOOGLEAPIS_LOGGING_CCS)
- HOST_SYSTEM = $(shell uname | cut -f 1 -d_)
- SYSTEM ?= $(HOST_SYSTEM)
- @@ -36,7 +38,7 @@ googleapis.ar: $(GOOGLEAPIS_CCS:.cc=.o)
- ar r $@ $?
- t: t.cc googleapis.ar
- - g++ $(CXXFLAGS) $(CPPFLAGS) -o t $(LDFLAGS) $^
- + g++ $(CXXFLAGS) $(CPPFLAGS) -o t $(LDFLAGS) $^ /usr/local/lib/libprotobuf.a
- clean:
- rm -f *.o t googleapis.ar $(GOOGLEAPIS_CCS:.cc=.o)