INNER CODE UNIT · Go

GetPNFromLID

krypton-byte/neonize · goneonize/main.go:318

func GetPNFromLID(id *C.char, JIDByte *C.uchar, JIDSize C.int) *C.struct_BytesReturn {
	var neoJIDProto defproto.JID
	return_ := defproto.GetJIDFromStoreReturnFunction{}
	jidbyte := getByteByAddr(JIDByte, JIDSize)
	err := proto.Unmarshal(jidbyte, &neoJIDProto)
	if err != nil {
		return_.Error = proto.String(err.Error())
		return ProtoReturnV3(&return_)
	}
	lid := utils.DecodeJidProto(&neoJIDProto)
	cli := clients[C.GoString(id)].Store
	pn, err := cli.LIDs.GetPNForLID(context.Background(), lid)
	return_.Jid = utils.EncodeJidProto(pn)
	if err != nil {
		return_.Error = proto.String(err.Error())
	}
	return ProtoReturnV3(&return_)
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…