Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Main
Synchronet
Commits
8e263c46
Commit
8e263c46
authored
Aug 22, 2003
by
rswindell
Browse files
Added support for "Native Executable" toggle option for transfer protocols.
parent
f6731b40
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
31 additions
and
27 deletions
+31
-27
src/sbbs3/bat_xfer.cpp
src/sbbs3/bat_xfer.cpp
+3
-3
src/sbbs3/download.cpp
src/sbbs3/download.cpp
+9
-6
src/sbbs3/email.cpp
src/sbbs3/email.cpp
+1
-1
src/sbbs3/execfunc.cpp
src/sbbs3/execfunc.cpp
+2
-2
src/sbbs3/execmisc.cpp
src/sbbs3/execmisc.cpp
+2
-2
src/sbbs3/fido.cpp
src/sbbs3/fido.cpp
+1
-1
src/sbbs3/listfile.cpp
src/sbbs3/listfile.cpp
+1
-1
src/sbbs3/netmail.cpp
src/sbbs3/netmail.cpp
+1
-1
src/sbbs3/qwk.cpp
src/sbbs3/qwk.cpp
+3
-3
src/sbbs3/readmail.cpp
src/sbbs3/readmail.cpp
+1
-1
src/sbbs3/sbbs.h
src/sbbs3/sbbs.h
+1
-1
src/sbbs3/sbbsdefs.h
src/sbbs3/sbbsdefs.h
+4
-3
src/sbbs3/tmp_xfer.cpp
src/sbbs3/tmp_xfer.cpp
+1
-1
src/sbbs3/upload.cpp
src/sbbs3/upload.cpp
+1
-1
No files found.
src/sbbs3/bat_xfer.cpp
View file @
8e263c46
...
...
@@ -167,7 +167,7 @@ void sbbs_t::batchmenu()
sprintf
(
str
,
"%sBATCHDN.LST"
,
cfg
.
node_dir
);
sprintf
(
tmp2
,
"%sBATCHUP.LST"
,
cfg
.
node_dir
);
start
=
time
(
NULL
);
protocol
(
cmdstr
(
cfg
.
prot
[
xfrprot
]
->
bicmd
,
str
,
tmp2
,
NULL
),
true
);
protocol
(
xfrprot
,
cmdstr
(
cfg
.
prot
[
xfrprot
]
->
bicmd
,
str
,
tmp2
,
NULL
),
true
);
end
=
time
(
NULL
);
for
(
i
=
0
;
i
<
batdn_total
;
i
++
)
if
(
cfg
.
dir
[
batdn_dir
[
i
]]
->
seqdev
)
{
...
...
@@ -310,7 +310,7 @@ void sbbs_t::batchmenu()
if
(
online
==
ON_REMOTE
)
{
delfiles
(
cfg
.
temp_dir
,
ALLFILES
);
start
=
time
(
NULL
);
protocol
(
cmdstr
(
cfg
.
prot
[
xfrprot
]
->
batulcmd
,
str
,
nulstr
,
NULL
),
true
);
protocol
(
xfrprot
,
cmdstr
(
cfg
.
prot
[
xfrprot
]
->
batulcmd
,
str
,
nulstr
,
NULL
),
true
);
end
=
time
(
NULL
);
if
(
!
(
cfg
.
dir
[
xfrdir
]
->
misc
&
DIR_ULTIME
))
starttime
+=
end
-
start
;
...
...
@@ -461,7 +461,7 @@ BOOL sbbs_t::start_batch_download()
putnodedat
(
cfg
.
node_num
,
&
thisnode
);
/* calculate ETA */
}
start
=
time
(
NULL
);
error
=
protocol
(
cmdstr
(
cfg
.
prot
[
xfrprot
]
->
batdlcmd
,
str
,
list
,
NULL
),
false
);
error
=
protocol
(
xfrprot
,
cmdstr
(
cfg
.
prot
[
xfrprot
]
->
batdlcmd
,
str
,
list
,
NULL
),
false
);
end
=
time
(
NULL
);
if
(
cfg
.
prot
[
xfrprot
]
->
misc
&
PROT_DSZLOG
||
!
error
)
batch_download
(
xfrprot
);
...
...
src/sbbs3/download.cpp
View file @
8e263c46
...
...
@@ -178,11 +178,12 @@ void sbbs_t::notdownloaded(ulong size, time_t start, time_t end)
/****************************************************************************/
/* Handles start and stop routines for transfer protocols */
/****************************************************************************/
int
sbbs_t
::
protocol
(
char
*
cmdline
,
bool
cd
)
int
sbbs_t
::
protocol
(
uint
prot
,
char
*
cmdline
,
bool
cd
)
{
char
protlog
[
256
],
*
p
;
char
msg
[
256
];
int
i
;
long
ex_mode
;
FILE
*
stream
;
sprintf
(
protlog
,
"%sPROTOCOL.LOG"
,
cfg
.
node_dir
);
...
...
@@ -211,12 +212,14 @@ int sbbs_t::protocol(char *cmdline, bool cd)
telnet_mode
|=
TELNET_MODE_BIN_RX
;
}
send_telnet_cmd
(
TELNET_WILL
,
TELNET_BINARY
);
i
=
external
(
cmdline
,
EX_OUTL
#ifdef __unix__
/* file xfer progs use stdio on Unix */
|
EX_INR
|
EX_OUTR
|
EX_BIN
ex_mode
=
0
;
if
(
cfg
.
prot
[
prot
]
->
misc
&
PROT_NATIVE
)
ex_mode
|=
EX_NATIVE
;
#ifdef __unix__
/* file xfer progs must use stdio on Unix */
ex_mode
|=
(
EX_INR
|
EX_OUTR
|
EX_BIN
);
#endif
,
p
);
i
=
external
(
cmdline
,
ex_mode
,
p
);
/* disable telnet binary transmission mode */
send_telnet_cmd
(
TELNET_WONT
,
TELNET_BINARY
);
/* Got back to Text/NVT mode */
...
...
src/sbbs3/email.cpp
View file @
8e263c46
...
...
@@ -142,7 +142,7 @@ bool sbbs_t::email(int usernumber, char *top, char *subj, long mode)
&&
chk_ar
(
cfg
.
prot
[
x
]
->
ar
,
&
useron
))
break
;
if
(
x
<
cfg
.
total_prots
)
/* This should be always */
protocol
(
cmdstr
(
cfg
.
prot
[
x
]
->
ulcmd
,
str2
,
nulstr
,
NULL
),
true
);
protocol
(
x
,
cmdstr
(
cfg
.
prot
[
x
]
->
ulcmd
,
str2
,
nulstr
,
NULL
),
true
);
}
sprintf
(
tmp
,
"%s%s"
,
cfg
.
temp_dir
,
title
);
if
(
!
fexistcase
(
str2
)
&&
fexistcase
(
tmp
))
...
...
src/sbbs3/execfunc.cpp
View file @
8e263c46
...
...
@@ -375,7 +375,7 @@ int sbbs_t::exec_function(csi_t *csi)
if
(
cfg
.
prot
[
i
]
->
mnemonic
==
ch
&&
chk_ar
(
cfg
.
prot
[
i
]
->
ar
,
&
useron
))
break
;
if
(
i
<
cfg
.
total_prots
)
{
if
(
protocol
(
cmdstr
(
cfg
.
prot
[
i
]
->
dlcmd
,
csi
->
str
,
csi
->
str
,
str
),
false
)
==
0
)
if
(
protocol
(
i
,
cmdstr
(
cfg
.
prot
[
i
]
->
dlcmd
,
csi
->
str
,
csi
->
str
,
str
),
false
)
==
0
)
csi
->
logic
=
LOGIC_TRUE
;
autohangup
();
}
...
...
@@ -403,7 +403,7 @@ int sbbs_t::exec_function(csi_t *csi)
if
(
cfg
.
prot
[
i
]
->
mnemonic
==
ch
&&
chk_ar
(
cfg
.
prot
[
i
]
->
ar
,
&
useron
))
break
;
if
(
i
<
cfg
.
total_prots
)
{
if
(
protocol
(
cmdstr
(
cfg
.
prot
[
i
]
->
ulcmd
,
csi
->
str
,
csi
->
str
,
str
),
true
)
==
0
)
if
(
protocol
(
i
,
cmdstr
(
cfg
.
prot
[
i
]
->
ulcmd
,
csi
->
str
,
csi
->
str
,
str
),
true
)
==
0
)
csi
->
logic
=
LOGIC_TRUE
;
autohangup
();
}
...
...
src/sbbs3/execmisc.cpp
View file @
8e263c46
...
...
@@ -966,7 +966,7 @@ int sbbs_t::exec_misc(csi_t* csi, char *path)
break
;
csi
->
logic
=
LOGIC_FALSE
;
if
(
i
<
cfg
.
total_prots
)
if
(
protocol
(
cmdstr
(
j
==
SEND_FILE_VIA
if
(
protocol
(
i
,
cmdstr
(
j
==
SEND_FILE_VIA
?
cfg
.
prot
[
i
]
->
dlcmd
:
cfg
.
prot
[
i
]
->
ulcmd
,
str
,
str
,
buf
)
,
true
)
==
0
)
csi
->
logic
=
LOGIC_TRUE
;
...
...
@@ -984,7 +984,7 @@ int sbbs_t::exec_misc(csi_t* csi, char *path)
if
(
!
pp
||
!
(
*
pp
))
return
(
0
);
if
(
i
<
cfg
.
total_prots
)
if
(
protocol
(
cmdstr
(
j
==
SEND_FILE_VIA_VAR
if
(
protocol
(
i
,
cmdstr
(
j
==
SEND_FILE_VIA_VAR
?
cfg
.
prot
[
i
]
->
dlcmd
:
cfg
.
prot
[
i
]
->
ulcmd
,
*
pp
,
*
pp
,
buf
)
,
true
)
==
0
)
csi
->
logic
=
LOGIC_TRUE
;
...
...
src/sbbs3/fido.cpp
View file @
8e263c46
...
...
@@ -252,7 +252,7 @@ bool sbbs_t::netmail(char *into, char *title, long mode)
&&
chk_ar
(
cfg
.
prot
[
x
]
->
ar
,
&
useron
))
break
;
if
(
x
<
cfg
.
total_prots
)
/* This should be always */
protocol
(
cmdstr
(
cfg
.
prot
[
x
]
->
ulcmd
,
subj
,
nulstr
,
NULL
),
true
);
protocol
(
x
,
cmdstr
(
cfg
.
prot
[
x
]
->
ulcmd
,
subj
,
nulstr
,
NULL
),
true
);
}
sprintf
(
tmp
,
"%s%s"
,
cfg
.
temp_dir
,
title
);
if
(
!
fexistcase
(
subj
)
&&
fexistcase
(
tmp
))
...
...
src/sbbs3/listfile.cpp
View file @
8e263c46
...
...
@@ -1291,7 +1291,7 @@ int sbbs_t::listfileinfo(uint dirnum, char *filespec, long mode)
thisnode
.
aux
=
(
tm
.
tm_hour
*
60
)
+
tm
.
tm_min
;
putnodedat
(
cfg
.
node_num
,
&
thisnode
);
/* calculate ETA */
start
=
time
(
NULL
);
error
=
protocol
(
cmdstr
(
cfg
.
prot
[
i
]
->
dlcmd
,
path
,
nulstr
,
NULL
),
false
);
error
=
protocol
(
i
,
cmdstr
(
cfg
.
prot
[
i
]
->
dlcmd
,
path
,
nulstr
,
NULL
),
false
);
end
=
time
(
NULL
);
if
(
cfg
.
dir
[
f
.
dir
]
->
misc
&
DIR_TFREE
)
starttime
+=
end
-
start
;
...
...
src/sbbs3/netmail.cpp
View file @
8e263c46
...
...
@@ -130,7 +130,7 @@ bool sbbs_t::inetmail(char *into, char *subj, long mode)
&&
chk_ar
(
cfg
.
prot
[
x
]
->
ar
,
&
useron
))
break
;
if
(
x
<
cfg
.
total_prots
)
/* This should be always */
protocol
(
cmdstr
(
cfg
.
prot
[
x
]
->
ulcmd
,
str2
,
nulstr
,
NULL
),
true
);
protocol
(
x
,
cmdstr
(
cfg
.
prot
[
x
]
->
ulcmd
,
str2
,
nulstr
,
NULL
),
true
);
}
sprintf
(
tmp
,
"%s%s"
,
cfg
.
temp_dir
,
title
);
if
(
!
fexistcase
(
str2
)
&&
fexistcase
(
tmp
))
...
...
src/sbbs3/qwk.cpp
View file @
8e263c46
...
...
@@ -596,7 +596,7 @@ void sbbs_t::qwk_sec()
padfname
(
tmp2
,
fd
.
name
);
sprintf
(
str
,
"%sBATCHDN.LST"
,
cfg
.
node_dir
);
sprintf
(
tmp2
,
"%sBATCHUP.LST"
,
cfg
.
node_dir
);
error
=
protocol
(
cmdstr
(
cfg
.
prot
[
i
]
->
bicmd
,
str
,
tmp2
,
NULL
),
true
);
error
=
protocol
(
i
,
cmdstr
(
cfg
.
prot
[
i
]
->
bicmd
,
str
,
tmp2
,
NULL
),
true
);
batdn_total
=
batup_total
=
0
;
if
(
!
checkprotresult
(
cfg
.
prot
[
i
],
error
,
&
fd
))
{
last_ns_time
=
ns_time
;
...
...
@@ -685,7 +685,7 @@ void sbbs_t::qwk_sec()
sprintf
(
str
,
"%s%s.qwk"
,
cfg
.
temp_dir
,
cfg
.
sys_id
);
sprintf
(
tmp2
,
"%s.qwk"
,
cfg
.
sys_id
);
padfname
(
tmp2
,
fd
.
name
);
error
=
protocol
(
cmdstr
(
cfg
.
prot
[
i
]
->
dlcmd
,
str
,
nulstr
,
NULL
),
false
);
error
=
protocol
(
i
,
cmdstr
(
cfg
.
prot
[
i
]
->
dlcmd
,
str
,
nulstr
,
NULL
),
false
);
if
(
!
checkprotresult
(
cfg
.
prot
[
i
],
error
,
&
fd
))
{
last_ns_time
=
ns_time
;
for
(
i
=
0
;
i
<
cfg
.
total_subs
;
i
++
)
...
...
@@ -755,7 +755,7 @@ void sbbs_t::qwk_sec()
if
(
i
>=
cfg
.
total_prots
)
/* This shouldn't happen */
continue
;
sprintf
(
str
,
"%s%s.rep"
,
cfg
.
temp_dir
,
cfg
.
sys_id
);
protocol
(
cmdstr
(
cfg
.
prot
[
i
]
->
ulcmd
,
str
,
nulstr
,
NULL
),
true
);
protocol
(
i
,
cmdstr
(
cfg
.
prot
[
i
]
->
ulcmd
,
str
,
nulstr
,
NULL
),
true
);
unpack_rep
();
delfiles
(
cfg
.
temp_dir
,
ALLFILES
);
//autohangup();
...
...
src/sbbs3/readmail.cpp
View file @
8e263c46
...
...
@@ -268,7 +268,7 @@ void sbbs_t::readmail(uint usernumber, int which)
&&
chk_ar
(
cfg
.
prot
[
i
]
->
ar
,
&
useron
))
break
;
if
(
i
<
cfg
.
total_prots
)
{
error
=
protocol
(
cmdstr
(
cfg
.
prot
[
i
]
->
dlcmd
,
str2
,
nulstr
,
NULL
),
false
);
error
=
protocol
(
i
,
cmdstr
(
cfg
.
prot
[
i
]
->
dlcmd
,
str2
,
nulstr
,
NULL
),
false
);
if
(
checkprotresult
(
cfg
.
prot
[
i
],
error
,
&
fd
))
{
if
(
which
==
MAIL_YOUR
)
remove
(
str2
);
...
...
src/sbbs3/sbbs.h
View file @
8e263c46
...
...
@@ -590,7 +590,7 @@ public:
/* download.cpp */
void
downloadfile
(
file_t
*
f
);
void
notdownloaded
(
ulong
size
,
time_t
start
,
time_t
end
);
int
protocol
(
char
*
cmdline
,
bool
cd
);
int
protocol
(
uint
prot
,
char
*
cmdline
,
bool
cd
);
void
seqwait
(
uint
devnum
);
void
autohangup
(
void
);
bool
checkdszlog
(
file_t
*
);
...
...
src/sbbs3/sbbsdefs.h
View file @
8e263c46
...
...
@@ -198,11 +198,12 @@ typedef struct {
/* Bit values for level_misc[x] */
#define LEVEL_EXPTOLVL
(1<<0)
/* Expire to level_expireto[x] */
#define LEVEL_EXPTOVAL
(1<<1)
/* Expire to val[level_expireto[x]] */
#define LEVEL_EXPTOLVL
(1<<0)
/* Expire to level_expireto[x] */
#define LEVEL_EXPTOVAL
(1<<1)
/* Expire to val[level_expireto[x]] */
/* Bit values for prot[x].misc */
#define PROT_DSZLOG (1<<0)
/* Supports DSZ Log */
#define PROT_DSZLOG (1<<0)
/* Supports DSZ Log */
#define PROT_NATIVE (1<<1)
/* Native (32-bit) executable */
/* Bit values in netmail_misc */
...
...
src/sbbs3/tmp_xfer.cpp
View file @
8e263c46
...
...
@@ -176,7 +176,7 @@ void sbbs_t::temp_xfer()
putnodedat
(
cfg
.
node_num
,
&
thisnode
);
/* calculate ETA */
start
=
time
(
NULL
);
error
=
protocol
(
cmdstr
(
cfg
.
prot
[
i
]
->
dlcmd
,
str
,
nulstr
,
NULL
),
false
);
error
=
protocol
(
i
,
cmdstr
(
cfg
.
prot
[
i
]
->
dlcmd
,
str
,
nulstr
,
NULL
),
false
);
end
=
time
(
NULL
);
if
(
cfg
.
dir
[
temp_dirnum
]
->
misc
&
DIR_TFREE
)
starttime
+=
end
-
start
;
...
...
src/sbbs3/upload.cpp
View file @
8e263c46
...
...
@@ -499,7 +499,7 @@ bool sbbs_t::upload(uint dirnum)
break
;
if
(
i
<
cfg
.
total_prots
)
{
start
=
time
(
NULL
);
protocol
(
cmdstr
(
cfg
.
prot
[
i
]
->
ulcmd
,
str
,
nulstr
,
NULL
),
true
);
protocol
(
i
,
cmdstr
(
cfg
.
prot
[
i
]
->
ulcmd
,
str
,
nulstr
,
NULL
),
true
);
end
=
time
(
NULL
);
if
(
!
(
cfg
.
dir
[
dirnum
]
->
misc
&
DIR_ULTIME
))
/* Don't deduct upload time */
starttime
+=
end
-
start
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment