Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename classes in transport layer #9814

Merged
merged 4 commits into from
Sep 22, 2021

Conversation

kghost
Copy link
Contributor

@kghost kghost commented Sep 18, 2021

Problem

Class names in transport layer is not proper

Change overview

Rename classes in transport

SecureSession => CryptoContext
PeerConnectionState => SecureSession
PeerConnections => SecureSessionTable
SecureSessionMgr => SessionManager

This PR is automatically generated using following commands:

git sed -f g '\<SecureSession\>' CryptoContext
git sed -f g '\<PeerConnectionState\>' SecureSession
git sed -f g '\<PeerConnections\>' SecureSessionTable
git sed -f g '\<connectionState\>' secureSession
git sed -f g '\<GetPeerConnectionState\>' GetSecureSession
git sed -f g SecureSessionMgr SessionManager
git sed -f g secureSessionMgr sessionManager
git sed -f g sessionMgr sessionManager
git sed -f g GetSessionMgr GetSessionManager
git sed -f g mSessionMgr mSessionManager
git sed -f g '\<ssm\>' sessionManager
mv src/transport/SecureSession.h src/transport/CryptoContext.h
mv src/transport/SecureSession.cpp src/transport/CryptoContext.cpp
mv src/transport/PeerConnections.h src/transport/SecureSessionTable.h
mv src/transport/PeerConnectionState.h src/transport/SecureSession.h
sed -i 's/mSecureSession/mCryptoContext/g' src/transport/SecureSession.h

Note: git-sed is in git-extras package of debian/ubuntu

Testing

Verified using unit-tests

SecureSession => CryptoContext
PeerConnectionState => SecureSession
PeerConnections => SecureSessionTable
SecureSessionMgr => SessionManager
Copy link
Contributor

@andy31415 andy31415 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving as automated rename change.

Copy link
Contributor

@Damian-Nordic Damian-Nordic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Imho SecureSessionKeys would be a better name than CryptoContext as the latter sounds pretty generic, but anyway it's an improvement. Thanks for the cleanup!

@andy31415
Copy link
Contributor

@kghost - conflicts (large renames are likely to conflict in general :/ unfortunate)

@woody-apple
Copy link
Contributor

I would like to see @pan-apple or @bzbarsky-apple take a look at this before merge, given some semantic renames, but overall looks good.

@woody-apple
Copy link
Contributor

Thanks!

@github-actions
Copy link

Size increase report for "nrfconnect-example-build" from 0ade2d5

File Section File VM
chip-lock.elf rodata 56 56
chip-lock.elf text 44 44
chip-lock.elf device_handles 4 4
chip-shell.elf rodata 56 56
chip-shell.elf text 44 44
chip-shell.elf device_handles -12 -12
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-lock.elf and ./pull_artifact/chip-lock.elf:

sections,vmsize,filesize
.debug_loc,0,308
.debug_info,0,259
rodata,56,56
text,44,44
.debug_abbrev,0,34
.debug_ranges,0,32
device_handles,4,4
.shstrtab,0,-3
.debug_line,0,-85
.strtab,0,-157
.debug_str,0,-404

Comparing ./master_artifact/chip-shell.elf and ./pull_artifact/chip-shell.elf:

sections,vmsize,filesize
.debug_loc,0,306
.debug_info,0,259
.debug_line,0,155
rodata,56,56
text,44,44
.debug_abbrev,0,34
.debug_ranges,0,32
.shstrtab,0,-1
device_handles,-12,-12
.strtab,0,-147
.debug_str,0,-394


@github-actions
Copy link

Size increase report for "esp32-example-build" from 0ade2d5

File Section File VM
chip-all-clusters-app.elf .flash.rodata 56 56
chip-all-clusters-app.elf .flash.text 48 48
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-all-clusters-app.elf and ./pull_artifact/chip-all-clusters-app.elf:

sections,vmsize,filesize
.debug_loc,0,123
.flash.rodata,56,56
.flash.text,48,48
.debug_info,0,37
.shstrtab,0,1
.riscv.attributes,0,-1
.debug_ranges,0,-24
[Unmapped],0,-104
.debug_line,0,-141
.strtab,0,-157
.debug_str,0,-410


@andy31415 andy31415 merged commit eca9bff into project-chip:master Sep 22, 2021
@kghost kghost deleted the transport-rename branch September 23, 2021 03:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants