diff options
author | 2019-06-09 23:08:36 +0300 | |
---|---|---|
committer | 2019-06-09 23:08:36 +0300 | |
commit | 7c5042af3c606081d3f4b917ef667f6ed05780a8 (patch) | |
tree | d6f7adcaca6cb22ca44002b41dba43e069ffbebd /src/common/tlv.c | |
parent | 613622e8cb3c1d32c50e19d7f446d0c00c91250e (diff) | |
download | usurpation-7c5042af3c606081d3f4b917ef667f6ed05780a8.tar.gz usurpation-7c5042af3c606081d3f4b917ef667f6ed05780a8.tar.bz2 usurpation-7c5042af3c606081d3f4b917ef667f6ed05780a8.zip |
hook various previously unused modules together.
This now allows us to send messages to the device and such. Yay? Yay.
Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
Diffstat (limited to 'src/common/tlv.c')
-rwxr-xr-x | src/common/tlv.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/common/tlv.c b/src/common/tlv.c index 84b20ca..0e800ca 100755 --- a/src/common/tlv.c +++ b/src/common/tlv.c @@ -45,17 +45,17 @@ int tlv_get(char *in, struct tlv *tlv, char **saveptr) memcpy(&head, in, sizeof(head)); head = ntoh_tlvh(&head); + tlv->head = head; if (head.type == INVALID || !head.size) { ret = NONEWDATA; - goto out; + } else { + tlv->data = in + sizeof(head); } - tlv->head = head; - tlv->data = in + sizeof(head); if (saveptr) { *saveptr = in + sizeof(head) + head.size; } -out: + return ret; } |