Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
ad889d0b
Commit
ad889d0b
authored
Nov 26, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
6906344b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
3 deletions
+10
-3
wcfs/internal/_wcfs.pyx
wcfs/internal/_wcfs.pyx
+7
-2
wcfs/internal/wcfs_watchlink.cpp
wcfs/internal/wcfs_watchlink.cpp
+1
-1
wcfs/internal/wcfs_watchlink.h
wcfs/internal/wcfs_watchlink.h
+2
-0
No files found.
wcfs/internal/_wcfs.pyx
View file @
ad889d0b
...
@@ -23,11 +23,10 @@
...
@@ -23,11 +23,10 @@
# XXX doc
# XXX doc
from
golang
cimport
error
,
refptr
from
golang
cimport
string
,
error
,
refptr
from
golang
cimport
context
from
golang
cimport
context
from
libcpp
cimport
nullptr_t
,
nullptr
as
nil
from
libcpp
cimport
nullptr_t
,
nullptr
as
nil
from
libcpp.string
cimport
string
from
libcpp.utility
cimport
pair
from
libcpp.utility
cimport
pair
cdef
extern
from
*
:
cdef
extern
from
*
:
ctypedef
bint
cbool
"bool"
ctypedef
bint
cbool
"bool"
...
@@ -64,6 +63,7 @@ cdef extern from "wcfs_watchlink.h" nogil:
...
@@ -64,6 +63,7 @@ cdef extern from "wcfs_watchlink.h" nogil:
Oid
foid
Oid
foid
int64_t
blk
int64_t
blk
Tid
at
Tid
at
string
msg
cdef
extern
from
"wcfs.h"
nogil
:
cdef
extern
from
"wcfs.h"
nogil
:
...
@@ -152,6 +152,11 @@ cdef class PyPinReq:
...
@@ -152,6 +152,11 @@ cdef class PyPinReq:
return
None
return
None
return
at
# XXX -> tid bytes
return
at
# XXX -> tid bytes
# wcfs_test.py uses req.msg in several places
property
msg
:
def
__get__
(
PyPinReq
pypin
):
return
pypin
.
pinreq
.
msg
# ---- misc ----
# ---- misc ----
...
...
wcfs/internal/wcfs_watchlink.cpp
View file @
ad889d0b
...
@@ -319,7 +319,6 @@ error _WatchLink::recvReq(context::Context ctx, PinReq *prx) {
...
@@ -319,7 +319,6 @@ error _WatchLink::recvReq(context::Context ctx, PinReq *prx) {
if
(
!
ok
)
if
(
!
ok
)
return
io
::
EOF_
;
return
io
::
EOF_
;
//pkt.to_string();
return
_parsePinReq
(
prx
,
&
pkt
);
return
_parsePinReq
(
prx
,
&
pkt
);
}
}
...
@@ -329,6 +328,7 @@ static error _parsePinReq(PinReq *pin, const rxPkt *pkt) {
...
@@ -329,6 +328,7 @@ static error _parsePinReq(PinReq *pin, const rxPkt *pkt) {
printf
(
"parse pinreq: stream=%lu msg='%s'
\n
"
,
pkt
->
stream
,
&
pkt
->
data
[
0
]);
printf
(
"parse pinreq: stream=%lu msg='%s'
\n
"
,
pkt
->
stream
,
&
pkt
->
data
[
0
]);
pin
->
stream
=
pkt
->
stream
;
pin
->
stream
=
pkt
->
stream
;
string
msg
=
pkt
->
to_string
();
string
msg
=
pkt
->
to_string
();
pin
->
msg
=
msg
;
printf
(
"'%s'
\n
"
,
msg
.
c_str
());
printf
(
"'%s'
\n
"
,
msg
.
c_str
());
printf
(
"has_prefix: %i
\n
"
,
strings
::
has_prefix
(
msg
,
"pin "
));
printf
(
"has_prefix: %i
\n
"
,
strings
::
has_prefix
(
msg
,
"pin "
));
...
...
wcfs/internal/wcfs_watchlink.h
View file @
ad889d0b
...
@@ -117,6 +117,8 @@ struct PinReq {
...
@@ -117,6 +117,8 @@ struct PinReq {
zodb
::
Oid
foid
;
// request is about this file
zodb
::
Oid
foid
;
// request is about this file
int64_t
blk
;
// ----//---- about this block
int64_t
blk
;
// ----//---- about this block
zodb
::
Tid
at
;
// pin to this at; TidHead means unpin to head
zodb
::
Tid
at
;
// pin to this at; TidHead means unpin to head
string
msg
;
// XXX raw message for tests (TODO kill)
};
};
...
...
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