Merge lp:~laurynas-biveinis/percona-server/bug1186690-5.1 into lp:percona-server/5.1

Proposed by Laurynas Biveinis on 2013-06-02
Status: Merged
Approved by: Stewart Smith on 2013-06-03
Approved revision: 549
Merged at revision: 567
Proposed branch: lp:~laurynas-biveinis/percona-server/bug1186690-5.1
Merge into: lp:percona-server/5.1
Diff against target: 19 lines (+7/-1)
1 file modified
Percona-Server/mysys/my_net.c (+7/-1)
To merge this branch: bzr merge lp:~laurynas-biveinis/percona-server/bug1186690-5.1
Reviewer Review Type Date Requested Status
Stewart Smith (community) 2013-06-02 Approve on 2013-06-03
Review via email: mp+166970@code.launchpad.net
To post a comment you must log in.
Stewart Smith (stewart) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Percona-Server/mysys/my_net.c'
2--- Percona-Server/mysys/my_net.c 2011-07-03 15:47:37 +0000
3+++ Percona-Server/mysys/my_net.c 2013-06-02 13:05:35 +0000
4@@ -60,9 +60,15 @@
5 int buflen, int *h_errnop)
6 {
7 struct hostent *hp;
8+ int ret;
9 DBUG_ASSERT((size_t) buflen >= sizeof(*result));
10- if (gethostbyname_r(name,result, buffer, (size_t) buflen, &hp, h_errnop))
11+ ret= gethostbyname_r(name,result, buffer, (size_t) buflen, &hp, h_errnop);
12+ if (unlikely(ret || !hp)) {
13+ if (*h_errnop == NETDB_INTERNAL) {
14+ *h_errnop= errno;
15+ }
16 return 0;
17+ }
18 return hp;
19 }
20

Subscribers

People subscribed via source and target branches