Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
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
Container registry
Model registry
Operate
Environments
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
Jakob Huber
postgres-lambda-diff
Commits
71c1d59d
Commit
71c1d59d
authored
28 years ago
by
Bryan Henderson
Browse files
Options
Downloads
Patches
Plain Diff
Remove another snprintf() for Solaris.
parent
060f1d6a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/backend/postmaster/postmaster.c
+10
-3
10 additions, 3 deletions
src/backend/postmaster/postmaster.c
with
10 additions
and
3 deletions
src/backend/postmaster/postmaster.c
+
10
−
3
View file @
71c1d59d
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.1
7
1996/10/2
8 09:05:29
bryanh Exp $
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.1
8
1996/10/2
9 21:51:13
bryanh Exp $
*
*
* NOTES
* NOTES
*
*
...
@@ -663,13 +663,19 @@ static void
...
@@ -663,13 +663,19 @@ static void
send_error_reply
(
Port
*
port
,
const
char
*
errormsg
)
send_error_reply
(
Port
*
port
,
const
char
*
errormsg
)
{
{
int
rc
;
/* return code from sendto */
int
rc
;
/* return code from sendto */
char
*
reply
;
/* The literal reply string we put into the socket. This is a pointer
to storage we malloc.
*/
char
reply
[
201
];
char
reply
[
201
];
const
struct
linger
linger_parm
=
{
true
,
LINGER_TIME
};
const
struct
linger
linger_parm
=
{
true
,
LINGER_TIME
};
/* A parameter for setsockopt() that tells it to have close() block for
/* A parameter for setsockopt() that tells it to have close() block for
a while waiting for the frontend to read its outstanding messages.
a while waiting for the frontend to read its outstanding messages.
*/
*/
snprintf
(
reply
,
sizeof
(
reply
),
"E%s"
,
errormsg
);
reply
=
malloc
(
strlen
(
errormsg
)
+
10
);
sprintf
(
reply
,
"E%s"
,
errormsg
);
rc
=
send
(
port
->
sock
,
(
Addr
)
reply
,
strlen
(
reply
)
+
1
,
/* flags */
0
);
rc
=
send
(
port
->
sock
,
(
Addr
)
reply
,
strlen
(
reply
)
+
1
,
/* flags */
0
);
if
(
rc
<
0
)
if
(
rc
<
0
)
...
@@ -683,7 +689,8 @@ send_error_reply(Port *port, const char *errormsg)
...
@@ -683,7 +689,8 @@ send_error_reply(Port *port, const char *errormsg)
"Only partial error reply sent to front end.
\n
"
,
"Only partial error reply sent to front end.
\n
"
,
progname
);
progname
);
/* Now we have to make sure frontend has a chance to see what we
free
(
reply
);
/* Now we have to make sure frontend has a chance to see what we
just wrote.
just wrote.
*/
*/
rc
=
setsockopt
(
port
->
sock
,
SOL_SOCKET
,
SO_LINGER
,
rc
=
setsockopt
(
port
->
sock
,
SOL_SOCKET
,
SO_LINGER
,
...
...
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