[OpenAFS] butc_xbsa.c

Hans-Gunther Borrmann hans-gunther.borrmann@rz.uni-freiburg.de
Tue, 13 Jul 2004 14:21:59 +0200


Hello,

some time ago Rainer Toebbicke from CERN sent a patch to this mailing list 
that allows to use the XBSA interface of butc with TSM 5.x . I adopted this 
patch to 1.3.65 and attach it below. It worked for me in my test environment. 
Also contained is a line with a missing include in butc_xbsa. Is there any 
chance to get this patch integrated. Without the patch one can only use TSM 
3.7.1. The current version is 5.2.2!

==============================================================
*** butc_xbsa.c.orig    2003-12-07 23:49:21.000000000 +0100
--- butc_xbsa.c 2004-07-13 11:26:55.000000000 +0200
***************
*** 24,29 ****
--- 24,30 ----
  #include <errno.h>
  #include "butc_xbsa.h"
  #include <afs/butx.h>
+ #include <afs/bubasics.h>

  #include "error_macros.h"

***************
*** 258,265 ****
  {
      char envStrs[XBSA_NUM_ENV_STRS][BSA_MAX_DESC];
      char *envP[XBSA_NUM_ENV_STRS + 1];
!     char *ADSMMaxObject = "MAXOBJ=";
!     char *ADSMServer = "DSMSRVR=";
      char *tempStrPtr;
      int i;
      int rc;
--- 259,266 ----
  {
      char envStrs[XBSA_NUM_ENV_STRS][BSA_MAX_DESC];
      char *envP[XBSA_NUM_ENV_STRS + 1];
!     char *ADSMMaxObject = "TSMMAXOBJ=";
!     char *ADSMServer = "TSMSRVR=";
      char *tempStrPtr;
      int i;
      int rc;
***************
*** 305,310 ****
--- 306,312 ----
            tempStrPtr = tempStrPtr + strlen(ADSMServer);
            strcat(tempStrPtr, serverName);
            envP[1] = NULL;
+           envP[0] = NULL;     /* Hack for TSM V5 */
        } else {
            envP[0] = NULL;
            ELog(0, "xbsa_Initialize: The serverName was not specified\n");
***************
*** 375,381 ****
        xbsa_error(rc, info);
        return (BUTX_GETENVFAIL);
      }
!
      switch (XBSA_GET_SERVER_TYPE(info->serverType)) {
      case XBSA_SERVER_TYPE_ADSM:
        for (i = 0; i < XBSA_NUM_ENV_STRS; i++) {
--- 377,385 ----
        xbsa_error(rc, info);
        return (BUTX_GETENVFAIL);
      }
!
!  info->maxObjects = 255; /* Hack for ADSM V5: unclear what this actually 
means... */
!
      switch (XBSA_GET_SERVER_TYPE(info->serverType)) {
      case XBSA_SERVER_TYPE_ADSM:
        for (i = 0; i < XBSA_NUM_ENV_STRS; i++) {

-- 
________________________________________________________________
Hans-Gunther Borrmann <hans-gunther.borrmann@rz.uni-freiburg.de>
Rechenzentrum der Universitaet Freiburg
Hermann-Herder-Str. 10, D79104 FREIBURG
Tel.: +49 761/203-4652
Fax:  +49 761/203-4643