]> jspc29.x-matter.uni-frankfurt.de Git - daqdata.git/commitdiff
strerror used
authormuench <muench>
Mon, 19 Apr 2004 12:58:54 +0000 (12:58 +0000)
committermuench <muench>
Mon, 19 Apr 2004 12:58:54 +0000 (12:58 +0000)
allParam/rpc/rpcParam.c

index 2ce77a8c729d4d470a2416b6fd7018d0d91720b7..2267b721b114d8340ffc36e56608bf65c4cb73e9 100644 (file)
@@ -1,4 +1,4 @@
-static const char rcsId[] = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/allParam/rpc/rpcParam.c,v 1.5 2004-04-19 11:59:52 muench Exp $";
+static const char rcsId[] = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/allParam/rpc/rpcParam.c,v 1.6 2004-04-19 12:58:54 muench Exp $";
 #define _POSIX_C_SOURCE 199509L
 
 #if HAVE_CONFIG_H
@@ -44,12 +44,13 @@ int conSetupParam(Param * my, const char *setup)
 
        server = getenv("PARAM_RPCPAS_ADDR");
        if (server == NULL) {
+               Param_strerror(my, "Environment variable PARAM_RPCPAS_ADDR not set");
                retVal = -1;
        } else {
                rpcParam = malloc(sizeof(RpcParam));
                rpcParam->cl = clnt_create(server, RPCPARAMPROG, RPCPARAMVERS, "tcp");
                if (rpcParam->cl == NULL) {
-                       clnt_pcreateerror(server);
+                       Param_strerror(my, clnt_spcreateerror(server));
                        retVal = -1;
                } else {
                        char *arg;
@@ -224,23 +225,10 @@ int Param_getFilenameArray(const Param * my, const char *name, const char *idx,
 int Param_getBlob(const Param * my, const char *name, const char *idx, size_t * size, FILE ** val)
 {
        int retVal = 0;
-#if 0
-       char filename[PARAM_MAX_VALUE_LEN];
-       int rows;
-       FILE *stream;
-
-       retVal = Param_getFilename(my, name, idx, &rows, filename);
-       if ((rows == 0) || (stream = fopen(filename, "r")) == NULL) {
-               Param_strerror((Param *) my, strerror(errno));
-               *size = 0;
-               retVal = -1;
-       } else {
-               struct stat fileS, *file = &fileS;
-               stat(filename, file);
-               *size = (size_t) file->st_size;
-               *val = stream;
-       }
-#endif
+
+       retVal = -1;
+       Param_strerror(my, "Param_getBlob: Function not implemented");
+
        return retVal;
 }