From 3786a203c7b4008d51e19681f9d3eeca8d490ca5 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Tue, 1 Aug 2017 02:38:42 -0700 Subject: [PATCH] rtmp-services: Fix ingest update request user agent The user agent for the obsproject.com ingest update request would have the version string baked in to the plugin, so if the plugin library wasn't updated with the rest of the project, it would return the incorrect version. This makes sure it returns the correct version by requesting the version string from libobs itself. --- plugins/rtmp-services/rtmp-services-main.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/rtmp-services/rtmp-services-main.c b/plugins/rtmp-services/rtmp-services-main.c index f990ba5db..8ae1388c7 100644 --- a/plugins/rtmp-services/rtmp-services-main.c +++ b/plugins/rtmp-services/rtmp-services-main.c @@ -44,11 +44,16 @@ bool obs_module_load(void) { char *local_dir = obs_module_file(""); char *cache_dir = obs_module_config_path(""); + struct dstr module_name = {0}; + + dstr_copy(&module_name, "rtmp-services plugin (libobs "); + dstr_cat(&module_name, obs_get_version_string()); + dstr_cat(&module_name, ")"); if (cache_dir) { update_info = update_info_create( RTMP_SERVICES_LOG_STR, - RTMP_SERVICES_VER_STR, + module_name.array, RTMP_SERVICES_URL, local_dir, cache_dir, @@ -57,6 +62,7 @@ bool obs_module_load(void) bfree(local_dir); bfree(cache_dir); + dstr_free(&module_name); obs_register_service(&rtmp_common_service); obs_register_service(&rtmp_custom_service);