diff options
author | Yang Gu <yang.gu@intel.com> | 2010-05-13 18:48:19 +0800 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-05-13 11:02:52 -0500 |
commit | 353d955dead6ad280c6a42d1886e3492e345a07c (patch) | |
tree | c7ddd5359b27b7d37e732ef5667463a9c93a0907 /src/simutil.c | |
parent | 651ad72075fe61521db6581cdf7b76def63b7582 (diff) | |
download | ofono-353d955dead6ad280c6a42d1886e3492e345a07c.tar.bz2 |
simutil: Add comprehension tlv copy
Can be used to save the state of the current iterator and 'peek' ahead.
Diffstat (limited to 'src/simutil.c')
-rw-r--r-- | src/simutil.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/simutil.c b/src/simutil.c index 941c5517..b98c0110 100644 --- a/src/simutil.c +++ b/src/simutil.c @@ -307,6 +307,18 @@ const unsigned char *comprehension_tlv_iter_get_data( return iter->data; } +void comprehension_tlv_iter_copy(struct comprehension_tlv_iter *from, + struct comprehension_tlv_iter *to) +{ + to->max = from->max; + to->pos = from->pos; + to->pdu = from->pdu; + to->tag = from->tag; + to->cr = from->cr; + to->len = from->len; + to->data = from->data; +} + void ber_tlv_iter_init(struct ber_tlv_iter *iter, const unsigned char *pdu, unsigned int len) { |