Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
videolan
vlc
Commits
283669aa
Commit
283669aa
authored
Aug 21, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ftp: add callback to parse server responses
parent
3a4c96c5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
modules/access/ftp.c
modules/access/ftp.c
+16
-2
No files found.
modules/access/ftp.c
View file @
283669aa
...
...
@@ -159,8 +159,9 @@ static int ftp_SendCommand( vlc_object_t *obj, access_sys_t *sys,
These strings are not part of the requests, except in the case \377\377,
where the request contains one \377. */
static
int
ftp_RecvCommand
(
vlc_object_t
*
obj
,
access_sys_t
*
sys
,
int
*
restrict
codep
,
char
**
restrict
strp
)
static
int
ftp_RecvAnswer
(
vlc_object_t
*
obj
,
access_sys_t
*
sys
,
int
*
restrict
codep
,
char
**
restrict
strp
,
void
(
*
cb
)(
void
*
,
const
char
*
),
void
*
opaque
)
{
if
(
codep
!=
NULL
)
*
codep
=
500
;
...
...
@@ -198,6 +199,8 @@ static int ftp_RecvCommand( vlc_object_t *obj, access_sys_t *sys,
}
done
=
!
strncmp
(
resp
,
line
,
4
);
if
(
!
done
)
cb
(
opaque
,
line
);
free
(
line
);
}
while
(
!
done
);
...
...
@@ -215,6 +218,17 @@ error:
return
-
1
;
}
static
void
DummyLine
(
void
*
data
,
const
char
*
str
)
{
(
void
)
data
;
(
void
)
str
;
}
static
int
ftp_RecvCommand
(
vlc_object_t
*
obj
,
access_sys_t
*
sys
,
int
*
restrict
codep
,
char
**
restrict
strp
)
{
return
ftp_RecvAnswer
(
obj
,
sys
,
codep
,
strp
,
DummyLine
,
NULL
);
}
static
int
ftp_StartStream
(
vlc_object_t
*
,
access_sys_t
*
,
uint64_t
);
static
int
ftp_StopStream
(
vlc_object_t
*
,
access_sys_t
*
);
...
...
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