Remove global static non const variables
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
Direzione di ricerca
Start by locating the declarations and initialization paths for crypto_kernel, srtp_event_handler, srtp_err_report_handler, and the debug modules; compare how their state is used across srtp_t instances. The issue proposes moving this state into srtp_t and adding srtp_verify_self(), with self-tests disabled by default. Done means removing the non-const globals and updating initialization and shutdown APIs consistently.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Currently there are sever global static variables that can make using libsrtp from multiple sub projects problematic. All non const variables should be removed.
Current known ones include crypto_kernel, srtp_event_handler, srtp_err_report_handler & debug modules.
There are two options for removing them:
- Add them all as members of srtp_t so they are created and managed per srtp_t.
- Add them to a new libsrtp_t that can be then shared between a select number of srtp_t.
The first option is nice in that it cleans up the API, there will no longer need to be srtp_int() / srtp_shutdown(). The downside is that there will be duplication and a crypto kernel will effectively be initialized for each srtp_t created. The initialization may not be too expensive but the self test are. To prevent some of the over head the self test can be initially disabled and a explicit srtp_self_test() can be used if validation is required.
The second option requires there to be a new layer to the API that must be call before each srtp_t is created and requires the application to manage the libsrtp_t. It has the benefit of only needing to initialize and self test the crypto kernel once.
There is maybe a third options that combines the two, where it is either possible to create a libsrtp_t that can be shared with by many srtp_t's or a srtp_t can create it's own libsrtp_t if one was not provided.
The initial proposal is to go with option 1, removing the need for srtp_init() / srtp_shutdown(). The self test will be disabled by default but a srtp_verify_self() will be added.
The event handler can easily be moved to srtp_t. The debugging is less critical but it should be possible to also move it to a srtp_t.
- Lingua principale
- C
- Stelle
- 1.4k
- Fork
- 523
- Merge medio
- 3g 23h
- PR unite (30g)
- 14
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di cisco/libsrtp
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
cisco/libsrtp#816 · 4 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 30/100
cisco/libsrtp#761 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
cisco/libsrtp#721 · 19 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
Review public APIAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di cisco/libsrtp
Issue simili
-
ecs_ptr_from_json does not free the buffer of a string longer than 256 bytes on two error pathsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
SanderMertens/flecs#2444 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
Cisco-Talos/clamav#1941 ·
I maintainer di solito rispondono entro 2 giorni
-
Status: Opened
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
espressif/esp-eth-drivers#201 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 74/100
libsdl-org/SDL#16788 ·
I maintainer di solito rispondono entro 1 giorno