| 206 | } |
| 207 | |
| 208 | static int close_archive(struct session_vdev *vdev) |
| 209 | { |
| 210 | assert(vdev->archive); |
| 211 | |
| 212 | // close current inner file |
| 213 | if (vdev->capfile) |
| 214 | { |
| 215 | unzCloseCurrentFile(vdev->archive); |
| 216 | vdev->capfile = 0; |
| 217 | } |
| 218 | |
| 219 | int ret = unzClose(vdev->archive); |
| 220 | if (ret != UNZ_OK) |
| 221 | { |
| 222 | sr_err("close zip archive error!"); |
| 223 | } |
| 224 | |
| 225 | vdev->archive = NULL; |
| 226 | return SR_OK; |
| 227 | } |
| 228 | |
| 229 | static void send_error_packet(const struct sr_dev_inst *cb_sdi, struct session_vdev *vdev, struct sr_datafeed_packet *packet) |
| 230 | { |
no test coverage detected