From: Narasimha S. <nsh...@us...> - 2011-04-14 23:50:38
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "SFCC - Small Footprint CIM Client". The branch, master has been updated via c4521bda714ff1760ec7e5fbc1743c9ab3daccef (commit) from d5c6797643f975587a586ce4f6d9f8d3bf342682 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit c4521bda714ff1760ec7e5fbc1743c9ab3daccef Author: Narasimha Sharoff <nsh...@us...> Date: Thu Apr 14 16:48:21 2011 -0700 [3101151] sfcc failed to connect due to hardcoded path - using stat call ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index fbb635d..9e7a748 100644 --- a/ChangeLog +++ b/ChangeLog @@ -47,6 +47,7 @@ * cimc/cimcclient.c [ 3101151 ] SfcbLocal failed to connect due to hardcoded library path + (based on the patch by: Chris Poblete <Chr...@De...>) 2011-02-22 Narasimha Sharoff <nsh...@us...> diff --git a/cimc/cimcclient.c b/cimc/cimcclient.c index d520fc4..7ed10a3 100644 --- a/cimc/cimcclient.c +++ b/cimc/cimcclient.c @@ -25,6 +25,8 @@ #include <stdlib.h> #include <dlfcn.h> #include <string.h> +#include <sys/types.h> +#include <sys/stat.h> /* * Canonical CIM C API entry points @@ -42,6 +44,7 @@ CIMCEnv* NewCIMCEnv(const char *id, unsigned int options, int *rc, char **msg) void *library; InitCimcEnv init=NULL; CIMCEnv *rv=NULL; + struct stat sbuf; libName[LIBLEN]=0; entry[ENTLEN]=0; @@ -52,7 +55,7 @@ CIMCEnv* NewCIMCEnv(const char *id, unsigned int options, int *rc, char **msg) snprintf(*msg,ERRLEN,"Invalid connection type '%s'. Must be 'XML' or 'SfcbLocal'.",id); } else { if ((strcmp(id, "SfcbLocal") == 0) && - ((SFCB_LIBDIR != NULL) && (strlen(SFCB_LIBDIR) > 0))) { + (stat(SFCB_LIBDIR, &sbuf) == 0)) { snprintf(libName, LIBLEN, "%s/libcimcClient%s.so",SFCB_LIBDIR,id); } else { snprintf(libName, LIBLEN, "libcimcClient%s.so",id); hooks/post-receive -- SFCC - Small Footprint CIM Client |