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
f75f7987
Commit
f75f7987
authored
Feb 13, 2006
by
Arne Øslebø
Browse files
various bug fixes
git-svn-id:
file:///home/svn/mapi/trunk@347
8d5bb341-7cf1-0310-8cf6-ba355fef3186
parent
b4f3c8c1
Changes
8
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
f75f7987
...
...
@@ -109,8 +109,8 @@ mapi_function.o: mapi_function.c mapi_function.h
mapidagdrv.o
:
mapidagdrv.c mapi.h mapidrv.h mapidlib.h mapid.h
$(CC)
$(CFLAGS)
-fPIC
-c
$<
mapidagdrv.so
:
mapidagdrv.o
$(DAGAPI)
mapidlib.o flist.o mapiipc.o mstring.o mapilibhandler.o parseconf.o priorities.o
$(CC)
$(CFLAGS)
-shared
-o
$@
$^
-lpcap
-lfl
-lrt
mapidagdrv.so
:
mapidagdrv.o mapidlib.o flist.o mapiipc.o mstring.o mapilibhandler.o parseconf.o priorities.o
$(CC)
$(CFLAGS)
-shared
-o
$@
$^
-lpcap
-lfl
-lrt
$(DAGAPI)
mapinicdrv.o
:
mapinicdrv.c mapi.h mapidrv.h mapidlib.h mapid.h mapi_errors.h
$(CC)
$(CFLAGS)
-fPIC
-c
$<
...
...
mapidagdrv.c
View file @
f75f7987
...
...
@@ -83,7 +83,7 @@ int mapidrv_add_device(mapi_offline_device_status_t *olstatus,char *devname, int
}
int
mapidrv_delete_device
(
int
devid
)
{
{
dag_instance_t
*
i
=
flist_remove
(
devlist
,
devid
,
FLIST_LEAVE_DATA
);
if
(
i
!=
NULL
)
{
...
...
@@ -442,7 +442,8 @@ int
mapidrv_connect
(
int
devid
,
int
fd
)
{
dag_instance_t
*
i
=
flist_get
(
devlist
,
devid
);
if
(
i
==
NULL
)
return
;
return
mapid_connect
(
&
i
->
mapidlib
,
fd
);
}
...
...
mapidlib.c
View file @
f75f7987
...
...
@@ -245,6 +245,7 @@ void mapid_destroy(mapidlib_instance_t *i)
struct
mapidlibflow
*
f
;
if
(
i
!=
NULL
)
{
mapid_lock
(
i
);
// n=flist_head(i->flowlist);
#ifdef WITH_PRIORITIES
int
j
=
0
;
...
...
@@ -270,6 +271,8 @@ void mapid_destroy(mapidlib_instance_t *i)
flist_destroy
(
i
->
flowlist
,
FLIST_FREE_DATA
);
#endif
free
(
i
->
flowlist
);
mapid_unlock
(
i
);
}
else
if
(
libs_loaded
>
0
)
{
mapilh_free_libraries
();
...
...
mapinicdrv.c
View file @
f75f7987
...
...
@@ -478,6 +478,8 @@ int
mapidrv_close_flow
(
int
devid
,
int
fd
)
{
nic_instance_t
*
i
=
flist_get
(
devlist
,
devid
);
if
(
i
==
NULL
)
return
;
return
mapid_close_flow
(
&
i
->
mapidlib
,
fd
);
}
...
...
stdlib/binop.c
View file @
f75f7987
...
...
@@ -79,7 +79,7 @@ static int binop_instance(mapidflib_function_instance_t *instance,
fargs
=
instance
->
args
;
type
=
getargint
(
&
fargs
);
i
->
left
=
i
->
left
=
fhlp_get_function_instance
(
instance
->
hwinfo
->
gflist
,
getargint
(
&
fargs
),
getargint
(
&
fargs
));
i
->
right
=
fhlp_get_function_instance
(
instance
->
hwinfo
->
gflist
,
getargint
(
&
fargs
),
getargint
(
&
fargs
));
if
(
type
==
BINOP_SUB
)
...
...
stdlib/pktinfo.c
View file @
f75f7987
...
...
@@ -34,7 +34,6 @@ static int pktinfo_process_size(mapidflib_function_instance_t *instance,
mapid_pkthdr_t
*
pkt_head
)
{
(
*
(
unsigned
long
long
*
)
instance
->
result
.
data
)
=
(
unsigned
long
long
)
pkt_head
->
wlen
;
return
1
;
}
...
...
stdlib/res2file.c
View file @
f75f7987
...
...
@@ -143,7 +143,9 @@ static int res2file_process(mapidflib_function_instance_t *instance,
s
=
1
;
i
->
last
+=
i
->
ticks
;
while
(
i
->
last
+
i
->
ticks
<
pkt_head
->
ts
)
{
write
(
i
->
file
,
"0
\n
"
,
2
);
for
(
c
=
0
;
c
<
i
->
numfuncts
;
c
++
)
write
(
i
->
file
,
"0 "
,
2
);
write
(
i
->
file
,
"
\n
"
,
1
);
i
->
last
+=
i
->
ticks
;
}
}
...
...
stdlib/stats.c
View file @
f75f7987
...
...
@@ -99,7 +99,7 @@ static int stats_process(mapidflib_function_instance_t *instance,
if
(
s
->
min
>*
res
||
s
->
min
==
0
)
{
s
->
min
=*
res
;
}
s
->
count
++
;
s
->
sum
+=*
res
;
s
->
sum2
+=
((
long
double
)
*
res
*
(
long
double
)
*
res
);
...
...
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