Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
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
mariadb
Commits
ac79cbb1
Commit
ac79cbb1
authored
Nov 21, 2006
by
jonas@perch.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndb -
Fix bug wrt to '\r' handling in latest commit to bug#24011
parent
c8d07748
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
8 deletions
+7
-8
ndb/src/common/util/InputStream.cpp
ndb/src/common/util/InputStream.cpp
+2
-8
ndb/src/common/util/socket_io.cpp
ndb/src/common/util/socket_io.cpp
+5
-0
No files found.
ndb/src/common/util/InputStream.cpp
View file @
ac79cbb1
...
@@ -47,15 +47,9 @@ SocketInputStream::gets(char * buf, int bufLen) {
...
@@ -47,15 +47,9 @@ SocketInputStream::gets(char * buf, int bufLen) {
int
res
=
readln_socket
(
m_socket
,
m_timeout
,
buf
,
bufLen
-
1
);
int
res
=
readln_socket
(
m_socket
,
m_timeout
,
buf
,
bufLen
-
1
);
if
(
res
==
-
1
)
if
(
res
==
-
1
)
return
0
;
return
0
;
if
(
res
==
0
&&
buf
[
0
]
==
77
){
// select return 0
if
(
res
==
0
&&
buf
[
0
]
==
77
)
{
// select return 0
buf
[
0
]
=
0
;
buf
[
0
]
=
0
;
}
else
if
(
res
==
0
&&
buf
[
0
]
==
0
){
// only newline
buf
[
0
]
=
'\n'
;
buf
[
1
]
=
0
;
}
else
{
int
len
=
strlen
(
buf
);
buf
[
len
+
1
]
=
'\0'
;
buf
[
len
]
=
'\n'
;
}
}
return
buf
;
return
buf
;
}
}
ndb/src/common/util/socket_io.cpp
View file @
ac79cbb1
...
@@ -98,6 +98,11 @@ readln_socket(NDB_SOCKET_TYPE socket, int timeout_millis,
...
@@ -98,6 +98,11 @@ readln_socket(NDB_SOCKET_TYPE socket, int timeout_millis,
ptr
+=
t
;
ptr
+=
t
;
len
-=
t
;
len
-=
t
;
}
}
if
(
i
>
0
&&
buf
[
i
-
1
]
==
'\r'
)
{
buf
[
i
-
1
]
=
'\n'
;
ptr
--
;
}
ptr
[
0
]
=
0
;
ptr
[
0
]
=
0
;
return
ptr
-
buf
;
return
ptr
-
buf
;
}
}
...
...
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