From edbfca5474b59b865e383e0dae934ba293d9dc7d Mon Sep 17 00:00:00 2001 From: Tibor Stolz Date: Wed, 11 Nov 2015 10:33:03 +0100 Subject: [PATCH] fix BWController misspelling --- toxav/Makefile.inc | 4 ++-- toxav/{bwcontroler.c => bwcontroller.c} | 28 ++++++++++++------------- toxav/{bwcontroler.h => bwcontroller.h} | 16 +++++++------- toxav/rtp.c | 4 ++-- toxav/rtp.h | 6 +++--- toxav/toxav.c | 6 +++--- 6 files changed, 32 insertions(+), 32 deletions(-) rename toxav/{bwcontroler.c => bwcontroller.c} (88%) rename toxav/{bwcontroler.h => bwcontroller.h} (69%) diff --git a/toxav/Makefile.inc b/toxav/Makefile.inc index 083f862f..377588d9 100644 --- a/toxav/Makefile.inc +++ b/toxav/Makefile.inc @@ -14,8 +14,8 @@ libtoxav_la_SOURCES = ../toxav/rtp.h \ ../toxav/audio.c \ ../toxav/video.h \ ../toxav/video.c \ - ../toxav/bwcontroler.h \ - ../toxav/bwcontroler.c \ + ../toxav/bwcontroller.h \ + ../toxav/bwcontroller.c \ ../toxav/toxav.h \ ../toxav/toxav.c \ ../toxav/toxav_old.c diff --git a/toxav/bwcontroler.c b/toxav/bwcontroller.c similarity index 88% rename from toxav/bwcontroler.c rename to toxav/bwcontroller.c index 9dd15c93..503627c1 100644 --- a/toxav/bwcontroler.c +++ b/toxav/bwcontroller.c @@ -1,4 +1,4 @@ -/** bwcontroler.c +/** bwcontroller.c * * Copyright (C) 2013-2015 Tox project All Rights Reserved. * @@ -24,7 +24,7 @@ #endif /* HAVE_CONFIG_H */ #include -#include "bwcontroler.h" +#include "bwcontroller.h" #include "../toxcore/logger.h" #include "../toxcore/util.h" @@ -37,8 +37,8 @@ * */ -struct BWControler_s { - void (*mcb) (BWControler *, uint32_t, float, void *); +struct BWController_s { + void (*mcb) (BWController *, uint32_t, float, void *); void *mcb_data; Messenger *m; @@ -60,13 +60,13 @@ struct BWControler_s { }; int bwc_handle_data(Messenger *m, uint32_t friendnumber, const uint8_t *data, uint16_t length, void *object); -void send_update(BWControler *bwc); +void send_update(BWController *bwc); -BWControler *bwc_new(Messenger *m, uint32_t friendnumber, - void (*mcb) (BWControler *, uint32_t, float, void *), +BWController *bwc_new(Messenger *m, uint32_t friendnumber, + void (*mcb) (BWController *, uint32_t, float, void *), void *udata) { - BWControler *retu = calloc(sizeof(struct BWControler_s), 1); + BWController *retu = calloc(sizeof(struct BWController_s), 1); retu->mcb = mcb; retu->mcb_data = udata; @@ -85,7 +85,7 @@ BWControler *bwc_new(Messenger *m, uint32_t friendnumber, return retu; } -void bwc_kill(BWControler *bwc) +void bwc_kill(BWController *bwc) { if (!bwc) return; @@ -95,7 +95,7 @@ void bwc_kill(BWControler *bwc) rb_kill(bwc->rcvpkt.rb); free(bwc); } -void bwc_feed_avg(BWControler *bwc, uint32_t bytes) +void bwc_feed_avg(BWController *bwc, uint32_t bytes) { uint32_t *p; @@ -104,7 +104,7 @@ void bwc_feed_avg(BWControler *bwc, uint32_t bytes) *p = bytes; } -void bwc_add_lost(BWControler *bwc, uint32_t bytes) +void bwc_add_lost(BWController *bwc, uint32_t bytes) { if (!bwc) return; @@ -129,7 +129,7 @@ void bwc_add_lost(BWControler *bwc, uint32_t bytes) bwc->cycle.lost += bytes; send_update(bwc); } -void bwc_add_recv(BWControler *bwc, uint32_t bytes) +void bwc_add_recv(BWController *bwc, uint32_t bytes) { if (!bwc || !bytes) return; @@ -144,7 +144,7 @@ struct BWCMessage { uint32_t recv; }; -void send_update(BWControler *bwc) +void send_update(BWController *bwc) { if (current_time_monotonic() - bwc->cycle.lfu > BWC_REFRESH_INTERVAL_MS) { @@ -171,7 +171,7 @@ void send_update(BWControler *bwc) bwc->cycle.lsu = current_time_monotonic(); } } -int on_update (BWControler *bwc, struct BWCMessage *msg) +int on_update (BWController *bwc, struct BWCMessage *msg) { LOGGER_DEBUG ("%p Got update from peer", bwc); diff --git a/toxav/bwcontroler.h b/toxav/bwcontroller.h similarity index 69% rename from toxav/bwcontroler.h rename to toxav/bwcontroller.h index 53b07d38..48472dff 100644 --- a/toxav/bwcontroler.h +++ b/toxav/bwcontroller.h @@ -1,4 +1,4 @@ -/** bwcontroler.h +/** bwcontroller.h * * Copyright (C) 2013-2015 Tox project All Rights Reserved. * @@ -23,15 +23,15 @@ #define BWCONROLER_H #include "../toxcore/Messenger.h" -typedef struct BWControler_s BWControler; +typedef struct BWController_s BWController; -BWControler *bwc_new(Messenger *m, uint32_t friendnumber, - void (*mcb) (BWControler *, uint32_t, float, void *), +BWController *bwc_new(Messenger *m, uint32_t friendnumber, + void (*mcb) (BWController *, uint32_t, float, void *), void *udata); -void bwc_kill(BWControler *bwc); +void bwc_kill(BWController *bwc); -void bwc_feed_avg(BWControler *bwc, uint32_t bytes); -void bwc_add_lost(BWControler *bwc, uint32_t bytes); -void bwc_add_recv(BWControler *bwc, uint32_t bytes); +void bwc_feed_avg(BWController *bwc, uint32_t bytes); +void bwc_add_lost(BWController *bwc, uint32_t bytes); +void bwc_add_recv(BWController *bwc, uint32_t bytes); #endif /* BWCONROLER_H */ diff --git a/toxav/rtp.c b/toxav/rtp.c index 44114fff..3752d72f 100644 --- a/toxav/rtp.c +++ b/toxav/rtp.c @@ -24,7 +24,7 @@ #endif /* HAVE_CONFIG_H */ #include "rtp.h" -#include "bwcontroler.h" +#include "bwcontroller.h" #include "../toxcore/logger.h" #include "../toxcore/util.h" #include "../toxcore/Messenger.h" @@ -37,7 +37,7 @@ int handle_rtp_packet (Messenger *m, uint32_t friendnumber, const uint8_t *data, RTPSession *rtp_new (int payload_type, Messenger *m, uint32_t friendnumber, - BWControler *bwc, void *cs, + BWController *bwc, void *cs, int (*mcb) (void *, struct RTPMessage *)) { assert(mcb); diff --git a/toxav/rtp.h b/toxav/rtp.h index 0393ac27..7daa6fd7 100644 --- a/toxav/rtp.h +++ b/toxav/rtp.h @@ -22,7 +22,7 @@ #ifndef RTP_H #define RTP_H -#include "bwcontroler.h" +#include "bwcontroller.h" #include "../toxcore/Messenger.h" #include "stdbool.h" @@ -92,14 +92,14 @@ typedef struct { Messenger *m; uint32_t friend_number; - BWControler *bwc; + BWController *bwc; void *cs; int (*mcb) (void *, struct RTPMessage *msg); } RTPSession; RTPSession *rtp_new (int payload_type, Messenger *m, uint32_t friend_num, - BWControler *bwc, void *cs, + BWController *bwc, void *cs, int (*mcb) (void *, struct RTPMessage *)); void rtp_kill (RTPSession *session); int rtp_allow_receiving (RTPSession *session); diff --git a/toxav/toxav.c b/toxav/toxav.c index 9eda3412..a3aadcfa 100644 --- a/toxav/toxav.c +++ b/toxav/toxav.c @@ -45,7 +45,7 @@ typedef struct ToxAVCall_s { pthread_mutex_t mutex_video[1]; PAIR(RTPSession *, VCSession *) video; - BWControler *bwc; + BWController *bwc; bool active; MSICall *msi_call; @@ -87,7 +87,7 @@ struct ToxAV { uint32_t interval; /** Calculated interval */ }; -void callback_bwc (BWControler *bwc, uint32_t friend_number, float loss, void *user_data); +void callback_bwc (BWController *bwc, uint32_t friend_number, float loss, void *user_data); int callback_invite(void *toxav_inst, MSICall *call); int callback_start(void *toxav_inst, MSICall *call); @@ -857,7 +857,7 @@ void toxav_callback_video_receive_frame(ToxAV *av, toxav_video_receive_frame_cb * :: Internal * ******************************************************************************/ -void callback_bwc(BWControler *bwc, uint32_t friend_number, float loss, void *user_data) +void callback_bwc(BWController *bwc, uint32_t friend_number, float loss, void *user_data) { /* Callback which is called when the internal measure mechanism reported packet loss. * We report suggested lowered bitrate to an app. If app is sending both audio and video,