Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tarantool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
core
tarantool
Commits
1fd87b61
Commit
1fd87b61
authored
12 years ago
by
Dmitry Simonenko
Browse files
Options
Downloads
Patches
Plain Diff
lua-socket-fixes: use sio_socketname() for socket:tostring().
parent
8d568f4b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/sio.h
+1
-0
1 addition, 0 deletions
include/sio.h
src/lua/lua_socket.m
+1
-1
1 addition, 1 deletion
src/lua/lua_socket.m
src/sio.m
+1
-1
1 addition, 1 deletion
src/sio.m
with
3 additions
and
2 deletions
include/sio.h
+
1
−
0
View file @
1fd87b61
...
@@ -47,6 +47,7 @@ enum { SERVICE_NAME_MAXLEN = 32 };
...
@@ -47,6 +47,7 @@ enum { SERVICE_NAME_MAXLEN = 32 };
-
(
id
)
init
:
(
int
)
fd
in
:
(
const
char
*
)
format
,
...;
-
(
id
)
init
:
(
int
)
fd
in
:
(
const
char
*
)
format
,
...;
@end
@end
const
char
*
sio_socketname
(
int
fd
);
int
sio_socket
(
int
domain
,
int
type
,
int
protocol
);
int
sio_socket
(
int
domain
,
int
type
,
int
protocol
);
int
sio_shutdown
(
int
fd
,
int
how
);
int
sio_shutdown
(
int
fd
,
int
how
);
...
...
This diff is collapsed.
Click to expand it.
src/lua/lua_socket.m
+
1
−
1
View file @
1fd87b61
...
@@ -237,7 +237,7 @@ static int
...
@@ -237,7 +237,7 @@ static int
lbox_socket_tostring(struct lua_State *L)
lbox_socket_tostring(struct lua_State *L)
{
{
struct bio_socket *s = bio_checksocket(L, -1);
struct bio_socket *s = bio_checksocket(L, -1);
lua_push
f
string(L,
"%d",
s->coio.fd);
lua_pushstring(L,
sio_socketname(
s->coio.fd)
)
;
return 1;
return 1;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/sio.m
+
1
−
1
View file @
1fd87b61
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
#include
"say.h"
#include
"say.h"
/** Pretty print socket name and peer (for exceptions) */
/** Pretty print socket name and peer (for exceptions) */
static
const
char
*
const
char
*
sio_socketname
(
int
fd
)
sio_socketname
(
int
fd
)
{
{
static
__thread
char
name
[
2
*
SERVICE_NAME_MAXLEN
];
static
__thread
char
name
[
2
*
SERVICE_NAME_MAXLEN
];
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment