Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
shrapnel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
shrapnel
Commits
cec5954d
Commit
cec5954d
authored
Oct 03, 2013
by
Amit Dev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #50
parent
6025e3a9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
4 deletions
+11
-4
coro/lio.pyx
coro/lio.pyx
+10
-3
coro/ssh/auth/userauth.py
coro/ssh/auth/userauth.py
+1
-1
No files found.
coro/lio.pyx
View file @
cec5954d
...
...
@@ -22,6 +22,13 @@
__lio_version__
=
"$Id: //prod/main/ap/shrapnel/coro/lio.pyx#18 $"
from
cpython.string
cimport
PyString_Check
,
PyString_AS_STRING
,
\
PyString_FromStringAndSize
,
PyString_Size
from
cpython.list
cimport
PyList_Size
,
PyList_Append
from
cpython.tuple
cimport
PyTuple_Size
from
libc.string
cimport
strerror
from
libc.errno
cimport
errno
cdef
extern
from
"aio.h"
:
int
LIO_READ
,
LIO_WRITE
,
LIO_NOP
,
LIO_WAIT
,
LIO_NOWAIT
int
lio_listio
(
int
mode
,
aiocb
**
list
,
int
nent
,
sigevent
*
sig
)
...
...
@@ -77,13 +84,13 @@ class lio_listio_error (Exception):
pass
ctypedef
public
class
lio_request
[
object
lio_request_object
,
type
lio_request_type
]
:
cdef
k
queue_poller
poller
cdef
queue_poller
poller
cdef
object
coro
cdef
object
requests
cdef
int
num
cdef
aiocb
**
aiocbpl
def
__init__
(
self
,
k
queue_poller
poller
,
requests
):
def
__init__
(
self
,
queue_poller
poller
,
requests
):
cdef
int
i
cdef
lio_control_block
cb
self
.
num
=
PyTuple_Size
(
requests
)
...
...
@@ -173,7 +180,7 @@ ctypedef public class lio_request [ object lio_request_object, type lio_request_
# not needed since we do kqueue -> r = aio_error (&cb.cb)
r
=
_aio_return
(
&
cb
.
cb
)
if
r
==
-
1
:
PyTuple_SET_ITEM_SAFE
(
result
,
i
,
OSError
(
libc
.
errno
,
libc
.
strerror
(
libc
.
errno
)))
PyTuple_SET_ITEM_SAFE
(
result
,
i
,
OSError
(
errno
,
strerror
(
errno
)))
all_clear
=
0
else
:
if
cb
.
cb
.
aio_lio_opcode
==
LIO_WRITE
:
...
...
coro/ssh/auth/userauth.py
View file @
cec5954d
...
...
@@ -304,7 +304,7 @@ class Authenticator:
self
.
transport
=
transport
self
.
methods
=
methods
# XXX this assumes only one of each method type? e,g, might a user want multiple entries under 'publickey'?
self
.
by_name
=
{
method
.
name
:
method
for
method
in
self
.
methods
}
self
.
by_name
=
dict
((
method
.
name
,
method
)
for
method
in
self
.
methods
)
def
send
(
self
,
format
,
values
):
self
.
transport
.
send_packet
(
pack_payload
(
format
,
values
))
...
...
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