From e37c5c99bb2061f7ecd02431f0b22eb3c3949f1a Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Fri, 27 Apr 2012 13:21:42 -0400 Subject: [PATCH] adapt db_get_field_and_count to dbChannel_get_count --- src/ioc/db/db_access.c | 9 +++++---- src/ioc/db/db_access_routines.h | 5 ++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/ioc/db/db_access.c b/src/ioc/db/db_access.c index 479d501fa..3ac6660ff 100644 --- a/src/ioc/db/db_access.c +++ b/src/ioc/db/db_access.c @@ -127,8 +127,8 @@ int dbChannel_get(struct dbChannel *chan, int buffer_type, void *pbuffer, long no_elements, void *pfl) { long nRequest = no_elements; - int result = db_get_field_and_count( - paddr, buffer_type, pbuffer, &nRequest, pfl); + int result = dbChannel_get_count( + chan, buffer_type, pbuffer, &nRequest, pfl); if (nRequest < no_elements) { /* The database request returned fewer elements than requested, so * fill the remainder of the buffer with zeros. @@ -145,10 +145,11 @@ int dbChannel_get(struct dbChannel *chan, /* Performs the work of the public db_get_field API, but also returns the number * of elements actually copied to the buffer. The caller is responsible for * zeroing the remaining part of the buffer. */ -int epicsShareAPI db_get_field_and_count( - struct dbAddr *paddr, int buffer_type, +int epicsShareAPI dbChannel_get_count( + struct dbChannel *chan, int buffer_type, void *pbuffer, long *nRequest, void *pfl) { + dbAddr *paddr=&chan->addr; long status; long options; long i; diff --git a/src/ioc/db/db_access_routines.h b/src/ioc/db/db_access_routines.h index efe20b95c..380afb0fa 100644 --- a/src/ioc/db/db_access_routines.h +++ b/src/ioc/db/db_access_routines.h @@ -35,9 +35,8 @@ epicsShareFunc int dbChannel_get(struct dbChannel *chan, int buffer_type, void *pbuffer, long no_elements, void *pfl); epicsShareFunc int dbChannel_put(struct dbChannel *chan, int src_type, const void *psrc, long no_elements); -epicsShareFunc int epicsShareAPI db_get_field_and_count( - struct dbAddr *paddr, int buffer_type, - void *pbuffer, long *nRequest, void *pfl); +epicsShareFunc int epicsShareAPI dbChannel_get_count(struct dbChannel *chan, + int buffer_type, void *pbuffer, long *nRequest, void *pfl); #ifdef __cplusplus