Logo Search packages:      
Sourcecode: maxdb-7.5.00 version File versions  Download package

tcn00_Error cn85DBConnect ( VControlDataT *  vcontrol,
CommandT *  command,
char *  replyData,
int *  replyLen,
int  replyLenMax 
)

cn85DBConnect

Connect to kernel task.

Definition at line 369 of file vcn85.cpp.

References cn85FreeKernelSession(), cn85GetKernelSession(), cn50DBMUser::getClearMasterPwd(), and cn50DBMUser::getUserName().

{
  tcn00_Error nFuncReturn = OK_CN00;
  char        szToken   [PARAMETER_MAXLEN_CN90];
  bool        bUserTypeFound = false;
  cn50DBMUser oUser(vcontrol->dbname);
  /**/

  cn85FreeKernelSession(vcontrol); 

  if (cn90GetToken(command->args, szToken, 1, PARAMETER_MAXLEN_CN90)) {
    nFuncReturn = cn85_ReadUserByType(command->args, replyData, replyLen,bUserTypeFound, oUser);
    if (nFuncReturn == OK_CN00) {
      if (bUserTypeFound) {
        nFuncReturn = cn85GetKernelSession(vcontrol, replyData, replyLen, oUser.getUserName().asCharp(), oUser.getClearMasterPwd().asCharp());
      } else {
        nFuncReturn = cn85GetKernelSession(vcontrol, replyData, replyLen, szToken);
      } // end if
    } // end if
  } else {
    nFuncReturn = cn85GetKernelSession(vcontrol, replyData, replyLen);
  } // end if

  if (nFuncReturn == OK_CN00) {
    cn90AnswerOK(replyData, replyLen, NULL);
  } // end if

  return nFuncReturn;
} // end cn85DBConnect


Generated by  Doxygen 1.6.0   Back to index