Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Arne Øslebø
mapi
Commits
b92fa332
Commit
b92fa332
authored
Sep 18, 2006
by
Arne Øslebø
Browse files
fixed create_offline_flow
git-svn-id:
file:///home/svn/mapi/trunk@884
8d5bb341-7cf1-0310-8cf6-ba355fef3186
parent
733751ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/drivers/mapidagdrv.c
View file @
b92fa332
...
...
@@ -361,8 +361,6 @@ mapidrv_create_offline_flow (int devid, int format,int fd,char **devtype)
i
->
hwinfo
.
offline
=
4
;
if
(
format
==
MFF_DAG_ERF
)
{
//This should be read from the file
i
->
hwinfo
.
link_type
=
DLT_EN10MB
;
i
->
hwinfo
.
cap_length
=
1500
;
i
->
hwinfo
.
devtype
=
MAPI_DEVICE_DAG
;
i
->
hwinfo
.
devid
=
i
->
id
;
...
...
@@ -395,8 +393,6 @@ mapidrv_create_flow (int devid, int fd, char **devtype)
*
devtype
=
MAPI_DEVICE_DAG
;
inst
->
hwinfo
.
offline
=
1
;
//This should be read from the file
inst
->
hwinfo
.
link_type
=
DLT_EN10MB
;
inst
->
hwinfo
.
cap_length
=
1500
;
inst
->
hwinfo
.
devtype
=
MAPI_DEVICE_DAG
;
inst
->
hwinfo
.
devid
=
inst
->
id
;
...
...
@@ -519,10 +515,27 @@ mapidrv_create_flow (int devid, int fd, char **devtype)
int
mapidrv_connect
(
int
devid
,
int
fd
)
{
int
ret
;
dag_instance_t
*
i
=
flist_get
(
devlist
,
devid
);
if
(
i
==
NULL
)
return
-
1
;
return
mapid_connect
(
&
i
->
mapidlib
,
fd
);
ret
=
mapid_connect
(
&
i
->
mapidlib
,
fd
);
if
(
i
->
hwinfo
.
offline
==
4
)
{
if
(
pthread_attr_init
(
&
i
->
th_attr
)
!=
0
)
{
ERROR_CMD
(
fprintf
(
stderr
,
"pthread_attr_init failed [%s:%d]
\n
"
,
__FILE__
,
__LINE__
));
return
NICDRV_PTHR_ERR
;
}
if
(
pthread_create
(
&
i
->
th_proc
,
&
i
->
th_attr
,
(
void
*
)
mapidrv_offline_proc_loop
,
(
void
*
)
i
->
id
)
!=
0
)
{
ERROR_CMD
(
fprintf
(
stderr
,
"pthread_create failed [%s:%d]
\n
"
,
__FILE__
,
__LINE__
));
return
NICDRV_PTHR_ERR
;
}
}
return
ret
;
}
...
...
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