Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
b12be417
Commit
b12be417
authored
Jun 23, 2013
by
Martin Hurton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename parse_properties to parse_metadata
parent
ec943ac5
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
10 deletions
+12
-10
curve_client.cpp
src/curve_client.cpp
+1
-1
curve_server.cpp
src/curve_server.cpp
+1
-1
mechanism.cpp
src/mechanism.cpp
+1
-1
mechanism.hpp
src/mechanism.hpp
+6
-4
null_mechanism.cpp
src/null_mechanism.cpp
+1
-1
plain_mechanism.cpp
src/plain_mechanism.cpp
+2
-2
No files found.
src/curve_client.cpp
View file @
b12be417
...
@@ -399,7 +399,7 @@ int zmq::curve_client_t::process_ready (msg_t *msg_)
...
@@ -399,7 +399,7 @@ int zmq::curve_client_t::process_ready (msg_t *msg_)
return
-
1
;
return
-
1
;
}
}
rc
=
parse_
properties
(
ready_plaintext
+
crypto_box_ZEROBYTES
,
rc
=
parse_
metadata
(
ready_plaintext
+
crypto_box_ZEROBYTES
,
clen
-
crypto_box_ZEROBYTES
);
clen
-
crypto_box_ZEROBYTES
);
return
rc
;
return
rc
;
}
}
...
...
src/curve_server.cpp
View file @
b12be417
...
@@ -441,7 +441,7 @@ int zmq::curve_server_t::process_initiate (msg_t *msg_)
...
@@ -441,7 +441,7 @@ int zmq::curve_server_t::process_initiate (msg_t *msg_)
}
}
}
}
return
parse_
properties
(
initiate_plaintext
+
crypto_box_ZEROBYTES
+
96
,
return
parse_
metadata
(
initiate_plaintext
+
crypto_box_ZEROBYTES
+
96
,
clen
-
crypto_box_ZEROBYTES
-
96
);
clen
-
crypto_box_ZEROBYTES
-
96
);
}
}
...
...
src/mechanism.cpp
View file @
b12be417
...
@@ -72,7 +72,7 @@ size_t zmq::mechanism_t::add_property (unsigned char *ptr, const char *name,
...
@@ -72,7 +72,7 @@ size_t zmq::mechanism_t::add_property (unsigned char *ptr, const char *name,
return
1
+
name_len
+
4
+
value_len
;
return
1
+
name_len
+
4
+
value_len
;
}
}
int
zmq
::
mechanism_t
::
parse_
properties
(
const
unsigned
char
*
ptr_
,
int
zmq
::
mechanism_t
::
parse_
metadata
(
const
unsigned
char
*
ptr_
,
size_t
length_
)
size_t
length_
)
{
{
size_t
bytes_left
=
length_
;
size_t
bytes_left
=
length_
;
...
...
src/mechanism.hpp
View file @
b12be417
...
@@ -69,14 +69,16 @@ namespace zmq
...
@@ -69,14 +69,16 @@ namespace zmq
size_t
add_property
(
unsigned
char
*
ptr
,
const
char
*
name
,
size_t
add_property
(
unsigned
char
*
ptr
,
const
char
*
name
,
const
void
*
value
,
size_t
value_len
)
const
;
const
void
*
value
,
size_t
value_len
)
const
;
// Parse a list of properties. Returns 0 on success
// Parses a metadata.
// and -1 on error, in which case errno is set.
// Metadata consists of a list of properties consisting of
int
parse_properties
(
const
unsigned
char
*
ptr_
,
size_t
length
);
// name and value as size-specified strings.
// Returns 0 on success and -1 on error, in which case errno is set.
int
parse_metadata
(
const
unsigned
char
*
ptr_
,
size_t
length
);
// This is called by parse_property method whenever it
// This is called by parse_property method whenever it
// parses a new property. The function should return 0
// parses a new property. The function should return 0
// on success and -1 on error, in which case it should
// on success and -1 on error, in which case it should
// set errno. Signaling error preve
tn
s parser from
// set errno. Signaling error preve
nt
s parser from
// parsing remaining data.
// parsing remaining data.
// Derived classes are supposed to override this
// Derived classes are supposed to override this
// method to handle custom processing.
// method to handle custom processing.
...
...
src/null_mechanism.cpp
View file @
b12be417
...
@@ -99,7 +99,7 @@ int zmq::null_mechanism_t::process_handshake_message (msg_t *msg_)
...
@@ -99,7 +99,7 @@ int zmq::null_mechanism_t::process_handshake_message (msg_t *msg_)
ptr
+=
8
;
ptr
+=
8
;
bytes_left
-=
8
;
bytes_left
-=
8
;
int
rc
=
parse_
properties
(
ptr
,
bytes_left
);
int
rc
=
parse_
metadata
(
ptr
,
bytes_left
);
if
(
rc
==
0
)
{
if
(
rc
==
0
)
{
int
rc
=
msg_
->
close
();
int
rc
=
msg_
->
close
();
errno_assert
(
rc
==
0
);
errno_assert
(
rc
==
0
);
...
...
src/plain_mechanism.cpp
View file @
b12be417
...
@@ -285,7 +285,7 @@ int zmq::plain_mechanism_t::process_initiate_command (msg_t *msg_)
...
@@ -285,7 +285,7 @@ int zmq::plain_mechanism_t::process_initiate_command (msg_t *msg_)
errno
=
EPROTO
;
errno
=
EPROTO
;
return
-
1
;
return
-
1
;
}
}
return
parse_
properties
(
ptr
+
8
,
bytes_left
-
8
);
return
parse_
metadata
(
ptr
+
8
,
bytes_left
-
8
);
}
}
int
zmq
::
plain_mechanism_t
::
ready_command
(
msg_t
*
msg_
)
const
int
zmq
::
plain_mechanism_t
::
ready_command
(
msg_t
*
msg_
)
const
...
@@ -329,7 +329,7 @@ int zmq::plain_mechanism_t::process_ready_command (msg_t *msg_)
...
@@ -329,7 +329,7 @@ int zmq::plain_mechanism_t::process_ready_command (msg_t *msg_)
errno
=
EPROTO
;
errno
=
EPROTO
;
return
-
1
;
return
-
1
;
}
}
return
parse_
properties
(
ptr
+
8
,
bytes_left
-
8
);
return
parse_
metadata
(
ptr
+
8
,
bytes_left
-
8
);
}
}
void
zmq
::
plain_mechanism_t
::
send_zap_request
(
const
std
::
string
&
username
,
void
zmq
::
plain_mechanism_t
::
send_zap_request
(
const
std
::
string
&
username
,
...
...
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