Skip to content

Commit

Permalink
Adjust symbol name for first load into FreeSWITCH
Browse files Browse the repository at this point in the history
I'd prefer if cargo would generate mod_prometheus.so
instead of libmod_prometheus.so but I did not find
a way to tell cargo or rustc to not prefix the binary
with 'lib'.

A post-build step on cargo would be also an option if
this were implemented: rust-lang/cargo#545
  • Loading branch information
moises-silva committed Aug 6, 2016
1 parent 33dff63 commit a4c1949
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mod_prometheus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ extern crate freeswitchrs;
use freeswitchrs::raw as fsr;
use freeswitchrs::mods::*; // This will get replaced with a mods prelude
use freeswitchrs::Status;
use std::borrow::Cow;

fn prometheus_load(mod_int: &ModInterface) -> Status {
mod_int.add_raw_api("counter_increase", "Increase counter", "counter_increase", counter_increase_api);
Expand All @@ -27,7 +26,7 @@ static MOD_PROMETHEUS_DEF: ModDefinition = ModDefinition {
runtime: None,
};

freeswitch_export_mod!(mod_prometheus_module_interface, MOD_PROMETHEUS_DEF);
freeswitch_export_mod!(libmod_prometheus_module_interface, MOD_PROMETHEUS_DEF);

#[allow(unused_variables)]
unsafe extern "C" fn counter_increase_api(cmd: *const std::os::raw::c_char,
Expand Down

0 comments on commit a4c1949

Please sign in to comment.