plugin.c
mumble_error_t mumble_log(const char *format, ...) {
    char *buf = malloc(LOG_BUF_SIZE);
    va_list args;
    va_start(args, format);
    vsnprintf(buf, LOG_BUF_SIZE - 1, format, args);
    buf[LOG_BUF_SIZE - 1] = '\n';
    va_end(args);

    int ret = mumbleAPI.log(ownID, buf);
    free(buf);
    return ret;
}
// Wrapper function to use the plugin logging API like printf
Wrapper function to use the plugin logging API like printf
Wrapper function to use the plugin logging API like printf
mumble_error_t mumble_log(const char *format, ...) {
    char *buf = malloc(LOG_BUF_SIZE);
    va_list args;
    va_start(args, format);
    vsnprintf(buf, LOG_BUF_SIZE - 1, format, args);
    buf[LOG_BUF_SIZE - 1] = '\n';
    va_end(args);
    int ret = mumbleAPI.log(ownID, buf);
    free(buf);
    return ret;
}
mumble_error_t mumble_log ( const char * format , ... ) { char * buf = malloc ( LOG_BUF_SIZE ) ; va_list args ; va_start ( args , format ) ; vsnprintf ( buf , LOG_BUF_SIZE - 1 , format , args ) ; buf [ LOG_BUF_SIZE - 1 ] = ' \n ' ; va_end ( args ) ; int ret = mumbleAPI . log ( ownID , buf ) ; free ( buf ) ; return ret ; }
Wrapper function to use the plugin logging API like printf
Wrapper function to use the plugin logging API like printf