Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
libvncserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rasky
libvncserver
Commits
efa12fa9
Commit
efa12fa9
authored
Apr 25, 2002
by
dscho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
memleaks patched
parent
160c85f4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
4 deletions
+38
-4
CHANGES
CHANGES
+2
-0
cursor.c
cursor.c
+2
-0
example.c
example.c
+17
-1
main.c
main.c
+13
-3
rfbserver.c
rfbserver.c
+4
-0
No files found.
CHANGES
View file @
efa12fa9
memory leaks squashed (localtime pseudo leak is still there :-)
small improvements for OSXvnc (still not working correctly)
synced with TightVNC 1.2.3
solaris compile cleanups
many x11vnc improvements
...
...
cursor.c
View file @
efa12fa9
...
...
@@ -272,6 +272,8 @@ char* rfbMakeMaskForXCursor(int width,int height,char* source)
void
rfbFreeCursor
(
rfbCursorPtr
cursor
)
{
if
(
cursor
)
{
if
(
cursor
->
richSource
)
free
(
cursor
->
richSource
);
free
(
cursor
->
source
);
free
(
cursor
->
mask
);
free
(
cursor
);
...
...
example.c
View file @
efa12fa9
...
...
@@ -262,6 +262,17 @@ int main(int argc,char** argv)
/* initialize the server */
rfbInitServer
(
rfbScreen
);
#define USE_OWN_LOOP
#ifdef USE_OWN_LOOP
{
int
i
;
for
(
i
=
0
;
i
<
200
;
i
++
)
{
fprintf
(
stderr
,
"%d
\r
"
,
i
);
rfbProcessEvents
(
rfbScreen
,
100000
);
}
}
#else
#ifndef BACKGROUND_LOOP_TEST
/* this is the blocking event loop, i.e. it never returns */
/* 40000 are the microseconds, i.e. 0.04 seconds */
...
...
@@ -274,6 +285,11 @@ int main(int argc,char** argv)
rfbRunEventLoop
(
rfbScreen
,
-
1
,
TRUE
);
/* now we could do some cool things like rendering */
while
(
1
)
sleep
(
5
);
/* render(); */
#endif
rfbFreeCursor
(
rfbScreen
->
cursor
);
free
(
rfbScreen
->
frameBuffer
);
rfbScreenCleanup
(
rfbScreen
);
return
(
0
);
}
main.c
View file @
efa12fa9
...
...
@@ -55,7 +55,7 @@ rfbLog(const char *format, ...)
time
(
&
log_clock
);
strftime
(
buf
,
255
,
"%d/%m/%Y %T "
,
localtime
(
&
log_clock
));
fprintf
(
stderr
,
buf
);
fprintf
(
stderr
,
buf
);
vfprintf
(
stderr
,
format
,
args
);
fflush
(
stderr
);
...
...
@@ -583,9 +583,19 @@ rfbScreenInfoPtr rfbGetScreen(int* argc,char** argv,
void
rfbScreenCleanup
(
rfbScreenInfoPtr
rfbScreen
)
{
rfbClientIteratorPtr
i
=
rfbGetClientIterator
(
rfbScreen
);
rfbClientPtr
cl
,
cl1
=
rfbClientIteratorNext
(
i
);
while
(
cl1
)
{
cl
=
rfbClientIteratorNext
(
i
);
rfbClientConnectionGone
(
cl1
);
cl1
=
cl
;
}
rfbReleaseClientIterator
(
i
);
/* TODO: hang up on all clients and free all reserved memory */
if
(
rfbScreen
->
colourMap
.
data
.
bytes
)
free
(
rfbScreen
->
colourMap
.
data
.
bytes
);
#define FREE_IF(x) if(rfbScreen->x) free(rfbScreen->x)
FREE_IF
(
colourMap
.
data
.
bytes
);
FREE_IF
(
underCursorBuffer
);
TINI_MUTEX
(
rfbScreen
->
cursorMutex
);
free
(
rfbScreen
);
}
...
...
rfbserver.c
View file @
efa12fa9
...
...
@@ -124,6 +124,7 @@ void
rfbReleaseClientIterator
(
rfbClientIteratorPtr
iterator
)
{
IF_PTHREADS
(
if
(
iterator
->
next
)
rfbDecrClientRef
(
iterator
->
next
));
free
(
iterator
);
}
...
...
@@ -372,6 +373,8 @@ rfbClientConnectionGone(cl)
pointerClient
=
NULL
;
sraRgnDestroy
(
cl
->
modifiedRegion
);
sraRgnDestroy
(
cl
->
requestedRegion
);
sraRgnDestroy
(
cl
->
copyRegion
);
UNLOCK
(
rfbClientListMutex
);
...
...
@@ -1123,6 +1126,7 @@ rfbSendFramebufferUpdate(cl, givenUpdateRegion)
break
;
}
}
sraRgnReleaseIterator
(
i
);
if
(
nUpdateRegionRects
==
0xFFFF
&&
!
rfbSendLastRectMarker
(
cl
)
)
{
...
...
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