Question about return value of `eid_to_cbor`

Aperta
#370 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 6 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
38/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
c
Ambito
api

Direzione di ricerca

The contract is documented on the eid_to_cbor member in src/bsl/BPSecLib_Public.h around lines 450-452, and the mock implementation bsl_mock_encode_eid is in src/bsl/mock_bpa/encode.c around lines 95-103, which returns BSL_SUCCESS or BSL_ERR_ARG_INVALID. Read the header comment and the other callers of the EID encoding path to settle whether the callback should return a byte count or 0. Done means the doc comment and the mock agree, and any test that exercises the callback still passes. Ask a maintainer before changing the contract.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

https://github.com/NASA-AMMOS/BSL/blob/999505cb430383ce9b38b5cb9e8efabc25497eb3/src/bsl/BPSecLib_Public.h#L450-L452 https://nasa-ammos.github.io/BSL/html/structBSL__HostDescriptors__t.html#ab78107eb001cdd4473a2c62e7eabd872
The docs say that the function registered to eid_to_cbor should return the "Number of bytes CBOR encoded EID must be".

But the mock BPA's function, bsl_mock_encode_eid, either returns BSL_SUCCESS or BSL_ERR_ARG_INVALID
https://github.com/NASA-AMMOS/BSL/blob/999505cb430383ce9b38b5cb9e8efabc25497eb3/src/bsl/mock_bpa/encode.c#L95-L103 So my question is whether we should be returning the number of encoded bytes or 0 on success

Lingua principale
C
Stelle
16
Fork
11
Merge medio
8g 3h
PR unite (30g)
10

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di NASA-AMMOS/BSL

Tutte le issue di NASA-AMMOS/BSL

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.