Changeset View
Changeset View
Standalone View
Standalone View
g10/import.c
Show First 20 Lines • Show All 1,036 Lines • ▼ Show 20 Lines | while ((rc=parse_packet (&parsectx, pkt)) != -1) | ||||
pkt = NULL; | pkt = NULL; | ||||
goto ready; | goto ready; | ||||
} | } | ||||
/* Make a linked list of all packets. */ | /* Make a linked list of all packets. */ | ||||
switch (pkt->pkttype) | switch (pkt->pkttype) | ||||
{ | { | ||||
case PKT_COMPRESSED: | case PKT_COMPRESSED: | ||||
if (check_compress_algo (pkt->pkt.compressed->algorithm)) | rc = GPG_ERR_UNEXPECTED; | ||||
{ | |||||
rc = GPG_ERR_COMPR_ALGO; | |||||
goto ready; | goto ready; | ||||
} | |||||
else | |||||
{ | |||||
compress_filter_context_t *cfx = xmalloc_clear( sizeof *cfx ); | |||||
pkt->pkt.compressed->buf = NULL; | |||||
if (push_compress_filter2 (a, cfx, | |||||
pkt->pkt.compressed->algorithm, 1)) | |||||
xfree (cfx); /* e.g. in case of compression_algo NONE. */ | |||||
} | |||||
free_packet (pkt, &parsectx); | |||||
init_packet(pkt); | |||||
break; | |||||
case PKT_RING_TRUST: | case PKT_RING_TRUST: | ||||
/* Skip those packets unless we are in restore mode. */ | /* Skip those packets unless we are in restore mode. */ | ||||
if ((opt.import_options & IMPORT_RESTORE)) | if ((opt.import_options & IMPORT_RESTORE)) | ||||
goto x_default; | goto x_default; | ||||
free_packet (pkt, &parsectx); | free_packet (pkt, &parsectx); | ||||
init_packet(pkt); | init_packet(pkt); | ||||
break; | break; | ||||
▲ Show 20 Lines • Show All 3,633 Lines • Show Last 20 Lines |