Changeset 740 for vendor/current/libcli/cldap/cldap.c
- Timestamp:
- Nov 14, 2012, 12:59:34 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/libcli/cldap/cldap.c
r414 r740 168 168 } 169 169 170 static voidcldap_socket_recv_dgram(struct cldap_socket *c,170 static bool cldap_socket_recv_dgram(struct cldap_socket *c, 171 171 struct cldap_incoming *in); 172 172 … … 177 177 struct cldap_incoming *in = NULL; 178 178 ssize_t ret; 179 bool setup_done; 179 180 180 181 c->recv_subreq = NULL; … … 200 201 201 202 /* this function should free or steal 'in' */ 202 cldap_socket_recv_dgram(c, in);203 setup_done = cldap_socket_recv_dgram(c, in); 203 204 in = NULL; 204 205 205 if (! cldap_recvfrom_setup(c)) {206 if (!setup_done && !cldap_recvfrom_setup(c)) { 206 207 goto nomem; 207 208 } … … 219 220 handle recv events on a cldap socket 220 221 */ 221 static voidcldap_socket_recv_dgram(struct cldap_socket *c,222 static bool cldap_socket_recv_dgram(struct cldap_socket *c, 222 223 struct cldap_incoming *in) 223 224 { … … 263 264 /* this function should free or steal 'in' */ 264 265 c->incoming.handler(c, c->incoming.private_data, in); 265 return ;266 return false; 266 267 } 267 268 … … 271 272 search->response.asn1->ofs = 0; 272 273 274 DLIST_REMOVE(c->searches.list, search); 275 276 if (!cldap_recvfrom_setup(c)) { 277 goto nomem; 278 } 279 273 280 tevent_req_done(search->req); 274 goto done; 281 talloc_free(in); 282 return true; 275 283 276 284 nomem: … … 290 298 done: 291 299 talloc_free(in); 300 return false; 292 301 } 293 302 … … 321 330 322 331 if (!local_addr) { 323 ret = tsocket_address_inet_from_strings(c, "ip", 332 /* we use ipv4 here instead of ip, as otherwise we end 333 up with a PF_INET6 socket, and sendto() for ipv4 334 addresses will fail. That breaks cldap name 335 resolution for winbind to IPv4 hosts. */ 336 ret = tsocket_address_inet_from_strings(c, "ipv4", 324 337 NULL, 0, 325 338 &any); … … 947 960 */ 948 961 NTSTATUS cldap_netlogon_recv(struct tevent_req *req, 949 struct smb_iconv_convenience *iconv_convenience,950 962 TALLOC_CTX *mem_ctx, 951 963 struct cldap_netlogon *io) … … 975 987 976 988 status = pull_netlogon_samlogon_response(data, mem_ctx, 977 iconv_convenience,978 989 &io->out.netlogon); 979 990 if (!NT_STATUS_IS_OK(status)) { … … 995 1006 */ 996 1007 NTSTATUS cldap_netlogon(struct cldap_socket *cldap, 997 struct smb_iconv_convenience *iconv_convenience,998 1008 TALLOC_CTX *mem_ctx, 999 1009 struct cldap_netlogon *io) … … 1018 1028 } 1019 1029 1020 status = cldap_netlogon_recv(req, iconv_convenience,mem_ctx, io);1030 status = cldap_netlogon_recv(req, mem_ctx, io); 1021 1031 talloc_free(req); 1022 1032 … … 1082 1092 */ 1083 1093 NTSTATUS cldap_netlogon_reply(struct cldap_socket *cldap, 1084 struct smb_iconv_convenience *iconv_convenience,1085 1094 uint32_t message_id, 1086 1095 struct tsocket_address *dest, … … 1096 1105 1097 1106 status = push_netlogon_samlogon_response(&blob, tmp_ctx, 1098 iconv_convenience,1099 1107 netlogon); 1100 1108 if (!NT_STATUS_IS_OK(status)) {
Note:
See TracChangeset
for help on using the changeset viewer.