1
0
mirror of https://github.com/CPunch/Laika.git synced 2026-04-07 08:10:03 +00:00

Lib: minor refactoring, more lcontent.c boilerplate

This commit is contained in:
2022-05-17 10:37:58 -05:00
parent b02f48c006
commit 83002faa62
7 changed files with 108 additions and 31 deletions

View File

@@ -27,10 +27,14 @@ struct sLaika_peer *laikaS_newPeer(struct sLaika_peerPacketInfo *pktTbl, struct
memset(peer->hostname, 0, LAIKA_HOSTNAME_LEN);
memset(peer->inet, 0, LAIKA_INET_LEN);
memset(peer->ipv4, 0, LAIKA_IPV4_LEN);
/* init content context */
laikaF_initContext(&peer->context);
return peer;
}
void laikaS_freePeer(struct sLaika_peer *peer) {
laikaF_cleanContext(&peer->context);
laikaS_cleanSocket(&peer->sock);
laikaM_free(peer);
}