Commit 5c45bcff authored by claes's avatar claes

Login as Proview user required, login and show user command added

parent 62ac2af5
/* /*
* Proview $Id: rt_rtt_functions.h,v 1.2 2005-09-01 14:57:56 claes Exp $ * Proview $Id: rt_rtt_functions.h,v 1.3 2008-06-24 07:39:57 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -23,7 +23,8 @@ ...@@ -23,7 +23,8 @@
/* Module rs_rtt_menu.c */ /* Module rs_rtt_menu.c */
int rtt_gdh_init( void); int rtt_gdh_init( void);
int rtt_initialize( char *login, int rtt_initialize( char *username,
char *password,
char *commandfile, char *commandfile,
char *mainmenu_title); char *mainmenu_title);
...@@ -393,6 +394,8 @@ char *rtt_pwr_dir( char *dir); ...@@ -393,6 +394,8 @@ char *rtt_pwr_dir( char *dir);
int rtt_ctx_push( menu_ctx ctx); int rtt_ctx_push( menu_ctx ctx);
int rtt_ctx_pop(); int rtt_ctx_pop();
menu_ctx rtt_current_ctx(); menu_ctx rtt_current_ctx();
int rtt_logon_pict( unsigned long *chn,
unsigned long *priv);
/* Module rs_rtt_crr.c */ /* Module rs_rtt_crr.c */
......
/* /*
* Proview $Id: rt_rtt_global.h,v 1.4 2005-11-22 12:20:19 claes Exp $ * Proview $Id: rt_rtt_global.h,v 1.5 2008-06-24 07:39:57 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -49,6 +49,7 @@ extern rtt_t_db rtt_appl_db[]; ...@@ -49,6 +49,7 @@ extern rtt_t_db rtt_appl_db[];
extern rtt_t_db rtt_rttsys_db[]; extern rtt_t_db rtt_rttsys_db[];
extern char rtt_time[80]; extern char rtt_time[80];
extern unsigned long rtt_priv; extern unsigned long rtt_priv;
extern char rtt_user[40];
extern char rtt_ConfigureObject[80]; extern char rtt_ConfigureObject[80];
extern pwr_tObjid rtt_UserObject; extern pwr_tObjid rtt_UserObject;
extern char rtt_DefaultVMSNode[80]; extern char rtt_DefaultVMSNode[80];
...@@ -125,6 +126,7 @@ unsigned long rtt_chn[4]; ...@@ -125,6 +126,7 @@ unsigned long rtt_chn[4];
rtt_t_recall *rtt_recallbuff; rtt_t_recall *rtt_recallbuff;
rtt_t_recall *rtt_value_recallbuff; rtt_t_recall *rtt_value_recallbuff;
unsigned long rtt_priv; unsigned long rtt_priv;
char rtt_user[40] = "";
char rtt_time[80]; char rtt_time[80];
char rtt_hw[20]; char rtt_hw[20];
char rtt_platform[20]; char rtt_platform[20];
......
/* /*
* Proview $Id: rt_rtt_helptext.h,v 1.3 2005-09-01 14:57:56 claes Exp $ * Proview $Id: rt_rtt_helptext.h,v 1.4 2008-06-24 07:39:57 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -96,6 +96,7 @@ exit\n\ ...@@ -96,6 +96,7 @@ exit\n\
learn start/file=\n\ learn start/file=\n\
learn stop\n\ learn stop\n\
logging...\n\ logging...\n\
login\n\
help\n\ help\n\
page\n\ page\n\
plcscan /on /off /hierarchy= /all\n\ plcscan /on /off /hierarchy= /all\n\
...@@ -134,6 +135,7 @@ show signals\n\ ...@@ -134,6 +135,7 @@ show signals\n\
show system\n\ show system\n\
show subcli\n\ show subcli\n\
show subsrv\n\ show subsrv\n\
show user\n\
show device\n\ show device\n\
store /file= /collect\n\ store /file= /collect\n\
top\n\ top\n\
...@@ -187,6 +189,7 @@ pwr_rtt> show clock\n\ ...@@ -187,6 +189,7 @@ pwr_rtt> show clock\n\
pwr_rtt> show alarm\n\ pwr_rtt> show alarm\n\
pwr_rtt> show event\n\ pwr_rtt> show event\n\
pwr_rtt> show symbol\n\ pwr_rtt> show symbol\n\
pwr_rtt> show user\n\
"}, "},
#ifdef OS_ELN #ifdef OS_ELN
{1, "SHOW SYSTEM","", {1, "SHOW SYSTEM","",
...@@ -492,6 +495,11 @@ Show the value of a symbol or show all the defined symbols.\n\n\ ...@@ -492,6 +495,11 @@ Show the value of a symbol or show all the defined symbols.\n\n\
pwr_rtt> show symbol 'symbol_name'\n\ pwr_rtt> show symbol 'symbol_name'\n\
pwr_rtt> show symbol [/all]\n\ pwr_rtt> show symbol [/all]\n\
"}, "},
{1, "SHOW USER","",
"\
Show the current user with name and privileges.\n\n\
pwr_rtt> show user\n\
"},
{1, "MONITOR GRAFCET","", {1, "MONITOR GRAFCET","",
"\ "\
Display the active steps and orders of a grafcet sequence.\n\n\ Display the active steps and orders of a grafcet sequence.\n\n\
...@@ -785,6 +793,15 @@ pwr_rtt> logging show /entry=\n\ ...@@ -785,6 +793,15 @@ pwr_rtt> logging show /entry=\n\
pwr_rtt> logging store [/entry=]/file=\n\ pwr_rtt> logging store [/entry=]/file=\n\
pwr_rtt> logging store /all/file=\n\ pwr_rtt> logging store /all/file=\n\
"}, "},
{1, "LOGIN",
"",
"\
Login as a Proview user with username and password.\n\
The login command will open the login frame which promps for\n\
username and password.\n\
\n\
pwr_rtt> login\n\
"},
{1, "SET","", {1, "SET","",
"\ "\
List of set commands:\n\n\ List of set commands:\n\n\
......
/* /*
* Proview $Id: rt_rtt_menu.c,v 1.12 2007-04-25 13:39:21 claes Exp $ * Proview $Id: rt_rtt_menu.c,v 1.13 2008-06-24 07:39:57 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -67,9 +67,12 @@ ...@@ -67,9 +67,12 @@
#include "pwr.h" #include "pwr.h"
#include "pwr_class.h" #include "pwr_class.h"
#include "pwr_baseclasses.h" #include "pwr_baseclasses.h"
#include "pwr_privilege.h"
#include "co_cdh.h" #include "co_cdh.h"
#include "co_dcli.h" #include "co_dcli.h"
#include "co_time.h" #include "co_time.h"
#include "co_syi.h"
#include "co_api_user.h"
#include "rt_gdh.h" #include "rt_gdh.h"
#include "rt_gdh_msg.h" #include "rt_gdh_msg.h"
#include "rt_mh.h" #include "rt_mh.h"
...@@ -191,8 +194,8 @@ static int rtt_help_getinfoline( ...@@ -191,8 +194,8 @@ static int rtt_help_getinfoline(
char **infoline); char **infoline);
static int rtt_logon( unsigned long *chn, static int rtt_logon( unsigned long *chn,
unsigned long *priv, unsigned long *priv,
int *noneth, char *username,
char *login); char *password);
static int rtt_menu_new_update_add( static int rtt_menu_new_update_add(
menu_ctx parent_ctx, menu_ctx parent_ctx,
rtt_t_menu_upd **menulist, rtt_t_menu_upd **menulist,
...@@ -329,26 +332,28 @@ int rtt_init_state_table() ...@@ -329,26 +332,28 @@ int rtt_init_state_table()
* *
**************************************************************************/ **************************************************************************/
int rtt_initialize( char *login, int rtt_initialize( char *username,
char *password,
char *commandfile, char *commandfile,
char *mainmenu_title) char *mainmenu_title)
{ {
int sts; int sts;
int noneth; int noneth = 0;
rtt_init_state_table(); rtt_init_state_table();
qio_assign( "stdin", (int *) &rtt_chn); qio_assign( "stdin", (int *) &rtt_chn);
rtt_logon( rtt_chn, &rtt_priv, &noneth, login); if ( strcmp( username, "NONETH_SYS") == 0) {
sts = rtt_recall_create( &rtt_recallbuff); noneth = 1;
if (EVEN(sts)) return sts; rtt_priv = RTT_PRV_SYS;
sts = rtt_recall_create( &rtt_value_recallbuff); }
if (EVEN(sts)) return sts;
if ( !noneth) if ( !noneth) {
{
sts = rtt_gdh_init(); sts = rtt_gdh_init();
rtt_logon( rtt_chn, &rtt_priv, username, password);
if ( rtt_gdh_started) if ( rtt_gdh_started)
sts = rtt_rttconfig(); sts = rtt_rttconfig();
...@@ -360,8 +365,12 @@ int rtt_initialize( char *login, ...@@ -360,8 +365,12 @@ int rtt_initialize( char *login,
} }
} }
if ( rtt_AlarmAutoLoad) sts = rtt_recall_create( &rtt_recallbuff);
{ if (EVEN(sts)) return sts;
sts = rtt_recall_create( &rtt_value_recallbuff);
if (EVEN(sts)) return sts;
if ( rtt_AlarmAutoLoad) {
/* Load alarm list */ /* Load alarm list */
sts = rtt_alarm_connect( rtt_UserObject, 0, 0, rtt_AlarmAck, sts = rtt_alarm_connect( rtt_UserObject, 0, 0, rtt_AlarmAck,
rtt_AlarmReturn, rtt_AlarmBeep); rtt_AlarmReturn, rtt_AlarmBeep);
...@@ -385,15 +394,13 @@ int rtt_initialize( char *login, ...@@ -385,15 +394,13 @@ int rtt_initialize( char *login,
rtt_parse_mainmenu( mainmenu_title); rtt_parse_mainmenu( mainmenu_title);
if ( *commandfile != 0) if ( *commandfile != 0) {
{
if ( rtt_args >= 5 && !strcmp( rtt_arg[4], "EXIT")) if ( rtt_args >= 5 && !strcmp( rtt_arg[4], "EXIT"))
sts = rtt_commandmode_start( commandfile, 1); sts = rtt_commandmode_start( commandfile, 1);
else else
sts = rtt_commandmode_start( commandfile, 0); sts = rtt_commandmode_start( commandfile, 0);
if ( sts == RTT__NOFILE) if ( sts == RTT__NOFILE) {
{
rtt_message('E',"Unable to open file"); rtt_message('E',"Unable to open file");
} }
} }
...@@ -421,17 +428,12 @@ int rtt_gdh_init() ...@@ -421,17 +428,12 @@ int rtt_gdh_init()
if ( rtt_gdh_started ) if ( rtt_gdh_started )
return RTT__SUCCESS; return RTT__SUCCESS;
/*** NEWGDH
sts = rtdb_CreateDB(&rtt_rtdb_size);
if (EVEN(sts)) return sts;
*/
sts = gdh_Init("rt_rtt"); sts = gdh_Init("rt_rtt");
if (EVEN(sts)) return sts; if (EVEN(sts)) return sts;
sts = gdh_GetNodeIndex (&rtt_nodidx);
sts = gdh_GetNodeIndex( &rtt_nodidx);
if (EVEN(sts)) return sts; if (EVEN(sts)) return sts;
/*** NEWGDH
rtdb_GetBaseAddress (&rtt_rtdb_base);
*/
rtt_gdh_started = 1; rtt_gdh_started = 1;
return RTT__SUCCESS; return RTT__SUCCESS;
...@@ -8242,59 +8244,112 @@ int rtt_menu_item_delete( ...@@ -8242,59 +8244,112 @@ int rtt_menu_item_delete(
static int rtt_logon( unsigned long *chn, static int rtt_logon( unsigned long *chn,
unsigned long *priv, unsigned long *priv,
int *noneth, char *username,
char *login) char *password)
{ {
unsigned long terminator;
unsigned long option;
char input_str[80];
int maxlen = 30;
int attempts = 0;
char sys_username[] = "SYS";
char sys_username2[] = "SYSANSV";
char proc_username[] = "PROC";
char el_username[] = "EL";
char el_username2[] = "SKIFTEL";
char op_username[] = "OP";
char noneth_str[] = "NONETH_";
// char double_height_top_half[4] = {27,'#','3',0};
// char double_height_bottom_half[4] = {27,'#','4',0};
// char double_width[4] = {27,'#','6',0};
char nodename[80];
int sts; int sts;
rtt_t_backgr *picture; unsigned int privilege;
char systemgroup[80];
pwr_sSecurity sec;
char opsys_username[80];
*noneth = 0; sts = gdh_GetObjectInfo( "pwrNode-System.SystemGroup", &systemgroup,
if ( *login != 0) sizeof(systemgroup));
{ if ( EVEN(sts)) return sts;
if ( !strncmp( login, noneth_str, strlen( noneth_str)))
{ if ( strcmp(username, "") != 0 && strcmp( password, "") != 0) {
*noneth = 1; sts = user_CheckUser( systemgroup, username, user_PwCrypt(password), &privilege);
login += strlen( noneth_str); if ( ODD(sts) && privilege | pwr_mAccess_AllRt) {
} if ( privilege & pwr_mPrv_System)
if ( (strcmp( login, sys_username) == 0) ||
(strcmp( login, sys_username2) == 0))
{
*priv = RTT_PRV_SYS; *priv = RTT_PRV_SYS;
return RTT__SUCCESS; else if ( privilege & pwr_mPrv_Maintenance)
} *priv = RTT_PRV_EL;
else if ( strcmp( login, proc_username) == 0) else if ( privilege & pwr_mPrv_Process ||
{ privilege & pwr_mPrv_Instrument)
*priv = RTT_PRV_PROC; *priv = RTT_PRV_PROC;
else
*priv = RTT_PRV_OP;
strncpy( rtt_user, username, sizeof(rtt_user));
return RTT__SUCCESS; return RTT__SUCCESS;
} }
else if (( strcmp( login, el_username) == 0) || sts = rtt_logon_pict( chn, priv);
( strcmp( login, el_username2) == 0)) if ( EVEN(sts))
{ exit(0);
return sts;
}
sts = gdh_GetSecurityInfo( &sec);
if ( ODD(sts) && sec.XttUseOpsysUser) {
syi_UserName( opsys_username, sizeof(opsys_username));
sts = user_GetUserPriv( systemgroup, opsys_username, &privilege);
if ( ODD(sts) && privilege | pwr_mAccess_AllRt) {
if ( privilege & pwr_mPrv_System)
*priv = RTT_PRV_SYS;
else if ( privilege & pwr_mPrv_Maintenance)
*priv = RTT_PRV_EL; *priv = RTT_PRV_EL;
else if ( privilege & pwr_mPrv_Process ||
privilege & pwr_mPrv_Instrument)
*priv = RTT_PRV_PROC;
else if ( privilege | pwr_mAccess_AllRt)
*priv = RTT_PRV_OP;
strncpy( rtt_user, opsys_username, sizeof(rtt_user));
return RTT__SUCCESS; return RTT__SUCCESS;
} }
else if ( strcmp( login, op_username) == 0) }
{ else if ( ODD(sts) && sec.DefaultXttPriv) {
privilege = sec.DefaultXttPriv;
if ( privilege & pwr_mPrv_System)
*priv = RTT_PRV_SYS;
else if ( privilege & pwr_mPrv_Maintenance)
*priv = RTT_PRV_EL;
else if ( privilege & pwr_mPrv_Process ||
privilege & pwr_mPrv_Instrument)
*priv = RTT_PRV_PROC;
else if ( privilege | pwr_mAccess_AllRt)
*priv = RTT_PRV_OP; *priv = RTT_PRV_OP;
strcpy( rtt_user, "DefaultUser");
return RTT__SUCCESS; return RTT__SUCCESS;
} }
} sts = rtt_logon_pict( chn, priv);
if ( EVEN(sts))
exit(0);
return sts;
}
/*************************************************************************
*
* Name: rtt_logon_pict()
*
* Type int
*
* Type Parameter IOGF Description
* unsigned long *chn I
* unsigned long *priv O
*
* Description:
* Logon of pwr_rtt.
*
**************************************************************************/
int rtt_logon_pict( unsigned long *chn,
unsigned long *priv)
{
unsigned long terminator;
unsigned long option;
char user_str[80];
char passw_str[80];
int maxlen = 30;
int attempts = 0;
char nodename[80];
int sts;
rtt_t_backgr *picture;
unsigned int privilege;
char systemgroup[80];
sts = gdh_GetObjectInfo( "pwrNode-System.SystemGroup", &systemgroup,
sizeof(systemgroup));
if ( EVEN(sts)) return sts;
sts = rtt_get_nodename( nodename, sizeof(nodename)); sts = rtt_get_nodename( nodename, sizeof(nodename));
rttsys_get_login_picture( &picture); rttsys_get_login_picture( &picture);
...@@ -8307,58 +8362,57 @@ static int rtt_logon( unsigned long *chn, ...@@ -8307,58 +8362,57 @@ static int rtt_logon( unsigned long *chn,
r_print(rtt_version); r_print(rtt_version);
r_print_buffer(); r_print_buffer();
option = RTT_OPT_NOSCROLL | RTT_OPT_NORECALL;
while ( attempts < 3) while ( attempts < 3) {
{
rtt_cursor_abs( 32, 20); rtt_cursor_abs( 32, 20);
rtt_eofline_erase(); rtt_eofline_erase();
r_print_buffer(); r_print_buffer();
rtt_get_input_string( (char *) chn, input_str, &terminator, option = RTT_OPT_NOSCROLL | RTT_OPT_NORECALL;
rtt_get_input_string( (char *) chn, user_str, &terminator,
maxlen, 0, option, 0, maxlen, 0, option, 0,
0, 0, "Username: "); 0, 0, "Username: ");
rtt_toupper( input_str, input_str); rtt_toupper( user_str, user_str);
rtt_message('S',""); rtt_message('S',"");
if ( terminator >= RTT_K_RETURN ) if ( terminator >= RTT_K_RETURN ) {
{ rtt_cursor_abs( 32, 20);
if ( !strncmp( login, noneth_str, strlen( noneth_str))) rtt_eofline_erase();
{ r_print_buffer();
*noneth = 1; option = RTT_OPT_NOSCROLL | RTT_OPT_NORECALL | RTT_OPT_NOECHO;
login += strlen( noneth_str); rtt_get_input_string( (char *) chn, passw_str, &terminator,
} maxlen, 0, option, 0,
if ( !strncmp( input_str, noneth_str, strlen( noneth_str))) 0, 0, "Password: ");
{ cdh_ToLower( passw_str, passw_str);
*noneth = 1; rtt_message('S',"");
strcpy( input_str, (char *) &input_str[strlen(noneth_str)]); if ( terminator >= RTT_K_RETURN ) {
sts = user_CheckUser( systemgroup, user_str, user_PwCrypt(passw_str), &privilege);
if ( EVEN(sts)) {
attempts++;
rtt_message('E',"User not authorized");
continue;
} }
if ( (strcmp( input_str, sys_username) == 0) ||
(strcmp( input_str, sys_username2) == 0)) if ( privilege & pwr_mPrv_System)
{
*priv = RTT_PRV_SYS; *priv = RTT_PRV_SYS;
return RTT__SUCCESS; else if ( privilege & pwr_mPrv_Maintenance)
}
else if ( strcmp( input_str, proc_username) == 0)
{
*priv = RTT_PRV_PROC;
return RTT__SUCCESS;
}
else if (( strcmp( input_str, el_username) == 0) ||
( strcmp( input_str, el_username2) == 0))
{
*priv = RTT_PRV_EL; *priv = RTT_PRV_EL;
return RTT__SUCCESS; else if ( privilege & pwr_mPrv_Process ||
} privilege & pwr_mPrv_Instrument)
else if ( strcmp( input_str, op_username) == 0) *priv = RTT_PRV_PROC;
{ else if ( privilege | pwr_mAccess_AllRt)
*priv = RTT_PRV_OP; *priv = RTT_PRV_OP;
else {
attempts++;
rtt_message('E',"User not authorized");
continue;
}
strncpy( rtt_user, user_str, sizeof(rtt_user));
return RTT__SUCCESS; return RTT__SUCCESS;
} }
rtt_message('E',"User not authorized");
} }
attempts++;
} }
r_print_buffer(); r_print_buffer();
exit(0); return 0;
} }
/************************************************************************* /*************************************************************************
...@@ -10300,20 +10354,20 @@ static int rtt_get_system_name( char *system_name, int size) ...@@ -10300,20 +10354,20 @@ static int rtt_get_system_name( char *system_name, int size)
{ {
pwr_tStatus sts; pwr_tStatus sts;
pwr_tObjid objid; pwr_tObjid objid;
pwr_sSystem *system_ptr; pwr_tAttrRef aref;
pwr_sSystem sys;
sts = gdh_GetClassList ( pwr_eClass_System, &objid); sts = gdh_GetClassList( pwr_eClass_System, &objid);
if (EVEN(sts)) if (EVEN(sts)) {
{
strcpy( system_name, ""); strcpy( system_name, "");
return sts; return sts;
} }
aref = cdh_ObjidToAref( objid);
sts = gdh_ObjidToPointer ( objid, (pwr_tAddress *) &system_ptr); sts = gdh_GetObjectInfoAttrref( &aref, &sys, sizeof(sys));
if ( EVEN(sts)) return sts; if ( EVEN(sts)) return sts;
strncpy( system_name, system_ptr->SystemName, size); strncpy( system_name, sys.SystemName, size);
return RTT__SUCCESS; return RTT__SUCCESS;
} }
......
/* /*
* Proview $Id: rt_rtt_menu.h,v 1.4 2005-09-06 14:17:56 claes Exp $ * Proview $Id: rt_rtt_menu.h,v 1.5 2008-06-24 07:39:57 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -364,43 +364,40 @@ unsigned int rtt_exception( void *signalP, void *mechanismP); \ ...@@ -364,43 +364,40 @@ unsigned int rtt_exception( void *signalP, void *mechanismP); \
int main(int argc, char *argv[]) \ int main(int argc, char *argv[]) \
{ \ { \
int sts, i; \ int sts, i; \
char login[20]; \ char username[40]; \
char password[40]; \
char commandfile[80]; \ char commandfile[80]; \
\ \
VAXC$ESTABLISH( rtt_exception); \ VAXC$ESTABLISH( rtt_exception); \
rtt_args = argc - 1; \ rtt_args = argc - 1; \
for ( i = 0; i < rtt_args; i++) \ for ( i = 0; i < rtt_args; i++) { \
{ \
if ( i >= (int)(sizeof(rtt_arg)/sizeof(rtt_arg[0]))) \ if ( i >= (int)(sizeof(rtt_arg)/sizeof(rtt_arg[0]))) \
break; \ break; \
strncpy( rtt_arg[i], argv[i+1], sizeof(rtt_arg[i]));\ strncpy( rtt_arg[i], argv[i+1], sizeof(rtt_arg[i]));\
rtt_toupper( rtt_arg[i], rtt_arg[i]); \ rtt_toupper( rtt_arg[i], rtt_arg[i]); \
} \ } \
if ( argc >= 2 ) \ if ( argc >= 3 ) { \
{ \ strcpy( username, argv[1]); \
strcpy( login, argv[1]); \ rtt_toupper( username, username); \
rtt_toupper( login, login); \ strcpy( password, argv[2]); \
if ( argc >= 3 ) \ if ( argc >= 4 ) { \
{ \ strcpy( commandfile, argv[3]); \
strcpy( commandfile, argv[2]); \ if (argc >= 5) { \
if (argc >= 4) \ strcpy(rtt_ConfigureObject,argv[4]); \
{ \ if (argc >= 6) { \
strcpy(rtt_ConfigureObject,argv[3]); \ strcpy( mainmenu_title, argv[5]); \
if (argc >= 5) \
{ \
strcpy( mainmenu_title, argv[4]); \
} \ } \
} \ } \
} \ } \
else \ else \
strcpy( commandfile, ""); \ strcpy( commandfile, ""); \
} \ } \
else \ else { \
{ \ strcpy( username, ""); \
strcpy( login, ""); \ strcpy( password, ""); \
strcpy( commandfile, ""); \ strcpy( commandfile, ""); \
} \ } \
sts = rtt_initialize( login, commandfile, mainmenu_title); \ sts = rtt_initialize( username, password, commandfile, mainmenu_title); \
sts = rtt_menu_new( 0, pwr_cNObjid, &mainmenu_ptr, rtt_mainmenu_title,\ sts = rtt_menu_new( 0, pwr_cNObjid, &mainmenu_ptr, rtt_mainmenu_title,\
0, RTT_MENUTYPE_STAT); \ 0, RTT_MENUTYPE_STAT); \
rtt_error_msg(sts); \ rtt_error_msg(sts); \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment