- add getter for fd digest bundle, uninline the setter
#include "lib/rpmlead.h"
#include "lib/signature.h"
#include "rpmio/digest.h"
-#include "rpmio/rpmio_internal.h" /* fd*Digest(), fd stats */
+#include "rpmio/rpmio_internal.h" /* fd digest bits */
#include "lib/header_internal.h" /* XXX headerCheck */
#include "debug.h"
goto exit;
}
- ctx = rpmDigestBundleDupCtx(fd->digests, (sigtag == RPMSIGTAG_MD5) ?
+ ctx = rpmDigestBundleDupCtx(fdGetBundle(fd), (sigtag == RPMSIGTAG_MD5) ?
PGPHASHALGO_MD5 : dig->signature.hash_algo);
break;
default:
return fd;
}
+void fdSetBundle(FD_t fd, rpmDigestBundle bundle)
+{
+ FDSANE(fd);
+ fd->digests = bundle;
+}
+
+rpmDigestBundle fdGetBundle(FD_t fd)
+{
+ FDSANE(fd);
+ return fd->digests;
+}
+
#define FDNREFS(fd) (fd ? ((FD_t)fd)->nrefs : -9)
#define FDTO(fd) (fd ? ((FD_t)fd)->rd_timeoutsecs : -99)
extern "C" {
#endif
-static inline
-void fdSetBundle(FD_t fd, rpmDigestBundle bundle)
-{
- FDSANE(fd);
- fd->digests = bundle;
-}
+void fdSetBundle(FD_t fd, rpmDigestBundle bundle);
+rpmDigestBundle fdGetBundle(FD_t fd);
/** \ingroup rpmio
* Attach digest to fd.