Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
541b1023
Commit
541b1023
authored
Jun 24, 2008
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
filelist added to protocol
parent
db964c02
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
1 deletion
+57
-1
src/exe/rt_neth/src/rt_neth.c
src/exe/rt_neth/src/rt_neth.c
+57
-1
No files found.
src/exe/rt_neth/src/rt_neth.c
View file @
541b1023
/*
* Proview $Id: rt_neth.c,v 1.1
4 2006-09-14 14:16:07
claes Exp $
* Proview $Id: rt_neth.c,v 1.1
5 2008-06-24 06:57:36
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -82,6 +82,7 @@ static void volumes (qcom_sGet*);
static
void
volumesR
(
qcom_sGet
*
);
static
void
volumes7
(
qcom_sGet
*
);
static
void
serverConnect
(
qcom_sGet
*
);
static
void
fileList
(
qcom_sGet
*
);
#if 0
static void linkEvent (pwr_tUInt32, net_eEvent);
static void sendIdAck (gdb_sNode*);
...
...
@@ -123,6 +124,7 @@ static char *cMsg[net_eMsg_end] = {
"getGclass"
,
"getGclassR"
,
"serverConnect"
,
"fileList"
,
"net_eMsg_"
,
"volumes7"
};
...
...
@@ -158,6 +160,7 @@ static void (*fromApplication[net_eMsg_end])(qcom_sGet *) = {
cmvolsm_GetGclass
,
bugError
,
/* net_eMsg_GetGclassR will never reach neth */
serverConnect
,
/* net_eMsg_serverConnect */
fileList
,
/* net_eMsg_fileList */
bugError
,
/* net_eMsg_ */
volumes7
};
...
...
@@ -1475,3 +1478,56 @@ serverConnect (
// nodeUp( np);
}
}
static
void
fileList
(
qcom_sGet
*
get
)
{
net_sFileList
*
mp
=
get
->
data
;
net_sFileListR
*
rmp
;
gdb_sNode
*
np
;
pwr_tStatus
sts
;
pwr_tUInt32
size
;
int
filecnt
;
pwr_tString40
*
filelist
;
qcom_sPut
put
;
gdb_ScopeLock
{
np
=
hash_Search
(
&
sts
,
gdbroot
->
nid_ht
,
&
mp
->
hdr
.
nid
);
}
gdb_ScopeUnlock
;
if
(
gdbroot
->
db
->
log
.
b
.
id
)
{
errh_Info
(
"Sending 'fileList' to %s (%s)"
,
np
->
name
,
cdh_NodeIdToString
(
NULL
,
np
->
nid
,
0
,
0
));
}
sts
=
gdh_SearchFile
(
pwr_cNOid
,
mp
->
dir
,
mp
->
pattern
,
&
filelist
,
&
filecnt
);
if
(
EVEN
(
sts
))
size
=
sizeof
(
*
rmp
);
else
size
=
sizeof
(
*
rmp
)
+
filecnt
*
sizeof
(
pwr_tString40
);
size
=
(
size
+
3
)
&
~
3
;
/* Size up to nearest multiple of 4. */
rmp
=
net_Alloc
(
&
sts
,
&
put
,
size
,
net_eMsg_fileListR
);
if
(
rmp
==
NULL
)
{
errh_Error
(
"Failed to allocate 'fileList' to %s (%s)"
,
np
->
name
,
cdh_NodeIdToString
(
NULL
,
np
->
nid
,
0
,
0
));
return
;
}
rmp
->
sts
=
sts
;
if
(
EVEN
(
sts
))
{
rmp
->
filecnt
=
0
;
}
else
{
rmp
->
filecnt
=
filecnt
;
memcpy
(
rmp
->
files
,
filelist
,
filecnt
*
sizeof
(
pwr_tString40
));
free
(
filelist
);
}
net_Reply
(
&
sts
,
get
,
&
put
,
0
);
}
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