Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
1f87ec3a
Commit
1f87ec3a
authored
Nov 07, 2008
by
Hans Leidekker
Committed by
Alexandre Julliard
Nov 10, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inetcomm: Support both forms of the UIDL and LIST commands.
parent
ba1ae62b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
6 deletions
+48
-6
pop3transport.c
dlls/inetcomm/pop3transport.c
+48
-6
No files found.
dlls/inetcomm/pop3transport.c
View file @
1f87ec3a
...
...
@@ -544,6 +544,14 @@ static void POP3Transport_CallbackProcessLISTResp(IInternetTransport *iface, cha
}
IPOP3Callback_OnResponse
((
IPOP3Callback
*
)
This
->
InetTransport
.
pCallback
,
&
response
);
if
(
!
response
.
fDone
)
{
InternetTransport_ReadLine
(
&
This
->
InetTransport
,
POP3Transport_CallbackProcessLISTResp
);
return
;
}
IPOP3Callback_OnResponse
((
IPOP3Callback
*
)
This
->
InetTransport
.
pCallback
,
&
response
);
}
static
void
POP3Transport_CallbackRecvLISTResp
(
IInternetTransport
*
iface
,
char
*
pBuffer
,
int
cbBuffer
)
...
...
@@ -570,6 +578,14 @@ static void POP3Transport_CallbackProcessUIDLResp(IInternetTransport *iface, cha
}
IPOP3Callback_OnResponse
((
IPOP3Callback
*
)
This
->
InetTransport
.
pCallback
,
&
response
);
if
(
!
response
.
fDone
)
{
InternetTransport_ReadLine
(
&
This
->
InetTransport
,
POP3Transport_CallbackProcessUIDLResp
);
return
;
}
IPOP3Callback_OnResponse
((
IPOP3Callback
*
)
This
->
InetTransport
.
pCallback
,
&
response
);
}
static
void
POP3Transport_CallbackRecvUIDLResp
(
IInternetTransport
*
iface
,
char
*
pBuffer
,
int
cbBuffer
)
...
...
@@ -884,7 +900,7 @@ static HRESULT WINAPI POP3Transport_CommandUSER(IPOP3Transport *iface, LPSTR use
TRACE
(
"(%s)
\n
"
,
username
);
len
=
sizeof
(
user
)
+
strlen
(
username
)
+
2
;
/* "\r\n" */
command
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
)
;
if
(
!
(
command
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
)))
return
S_FALSE
;
strcpy
(
command
,
user
);
strcat
(
command
,
username
);
...
...
@@ -907,7 +923,7 @@ static HRESULT WINAPI POP3Transport_CommandPASS(IPOP3Transport *iface, LPSTR pas
TRACE
(
"(%p)
\n
"
,
password
);
len
=
sizeof
(
pass
)
+
strlen
(
password
)
+
2
;
/* "\r\n" */
command
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
)
;
if
(
!
(
command
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
)))
return
S_FALSE
;
strcpy
(
command
,
pass
);
strcat
(
command
,
password
);
...
...
@@ -923,13 +939,26 @@ static HRESULT WINAPI POP3Transport_CommandPASS(IPOP3Transport *iface, LPSTR pas
static
HRESULT
WINAPI
POP3Transport_CommandLIST
(
IPOP3Transport
*
iface
,
POP3CMDTYPE
cmdtype
,
DWORD
dwPopId
)
{
static
char
list
[]
=
"LIST
\r\n
"
;
static
char
list
[]
=
"LIST %u
\r\n
"
;
static
char
list_all
[]
=
"LIST
\r\n
"
;
POP3Transport
*
This
=
(
POP3Transport
*
)
iface
;
char
*
command
;
int
len
;
TRACE
(
"(%u, %u)
\n
"
,
cmdtype
,
dwPopId
);
if
(
dwPopId
)
{
len
=
sizeof
(
list
)
+
10
+
2
;
/* "4294967296" + "\r\n" */
if
(
!
(
command
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
)))
return
S_FALSE
;
sprintf
(
command
,
list
,
dwPopId
);
}
else
command
=
list_all
;
init_parser
(
This
,
POP3_LIST
,
cmdtype
);
InternetTransport_DoCommand
(
&
This
->
InetTransport
,
list
,
POP3Transport_CallbackRecvLISTResp
);
InternetTransport_DoCommand
(
&
This
->
InetTransport
,
command
,
POP3Transport_CallbackRecvLISTResp
);
if
(
dwPopId
)
HeapFree
(
GetProcessHeap
(),
0
,
command
);
return
S_OK
;
}
...
...
@@ -1005,13 +1034,26 @@ static HRESULT WINAPI POP3Transport_CommandRSET(IPOP3Transport *iface)
static
HRESULT
WINAPI
POP3Transport_CommandUIDL
(
IPOP3Transport
*
iface
,
POP3CMDTYPE
cmdtype
,
DWORD
dwPopId
)
{
static
char
uidl
[]
=
"UIDL
\r\n
"
;
static
char
uidl
[]
=
"UIDL %u
\r\n
"
;
static
char
uidl_all
[]
=
"UIDL
\r\n
"
;
POP3Transport
*
This
=
(
POP3Transport
*
)
iface
;
char
*
command
;
int
len
;
TRACE
(
"(%u, %u)
\n
"
,
cmdtype
,
dwPopId
);
if
(
dwPopId
)
{
len
=
sizeof
(
uidl
)
+
10
+
2
;
/* "4294967296" + "\r\n" */
if
(
!
(
command
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
)))
return
S_FALSE
;
sprintf
(
command
,
uidl
,
dwPopId
);
}
else
command
=
uidl_all
;
init_parser
(
This
,
POP3_UIDL
,
cmdtype
);
InternetTransport_DoCommand
(
&
This
->
InetTransport
,
uidl
,
POP3Transport_CallbackRecvUIDLResp
);
InternetTransport_DoCommand
(
&
This
->
InetTransport
,
command
,
POP3Transport_CallbackRecvUIDLResp
);
if
(
dwPopId
)
HeapFree
(
GetProcessHeap
(),
0
,
command
);
return
S_OK
;
}
...
...
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