svn commit: samba r10649 - in branches/tmp/vl-cluster/source/lib: .
vlendec at samba.org
vlendec at samba.org
Fri Sep 30 11:18:30 GMT 2005
Author: vlendec
Date: 2005-09-30 11:18:29 +0000 (Fri, 30 Sep 2005)
New Revision: 10649
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10649
Log:
Bugfixes
Modified:
branches/tmp/vl-cluster/source/lib/messages.c
Changeset:
Modified: branches/tmp/vl-cluster/source/lib/messages.c
===================================================================
--- branches/tmp/vl-cluster/source/lib/messages.c 2005-09-30 11:04:21 UTC (rev 10648)
+++ branches/tmp/vl-cluster/source/lib/messages.c 2005-09-30 11:18:29 UTC (rev 10649)
@@ -778,7 +778,8 @@
{
static char *name = NULL;
if (name == NULL) {
- asprintf(&name, "%s/%s", lock_path("messaging"), "dispatch");
+ asprintf(&name, "%s/%s:%s", lock_path("messaging"),
+ lp_socket_address(), "dispatch");
SMB_ASSERT(name != NULL);
}
return name;
@@ -925,7 +926,7 @@
ZERO_STRUCT(sinaddr);
sinaddr.sin_family = AF_INET;
sinaddr.sin_addr = pid->ip;
- sinaddr.sin_port = MESSAGING_PORT;
+ sinaddr.sin_port = htons(MESSAGING_PORT);
addr = (struct sockaddr *)&sinaddr;
addrlen = sizeof(sinaddr);
@@ -1177,6 +1178,7 @@
{
int parent_pipe[2];
int fd, tcp_fd;
+ char *name;
if (pipe(parent_pipe) < 0) {
return;
@@ -1191,7 +1193,12 @@
close(parent_pipe[1]);
- fd = create_dgram_sock(lock_path("messaging"), "dispatch", 0700);
+ asprintf(&name, "%s:dispatch", lp_socket_address());
+ if (name == NULL) {
+ smb_panic("asprintf failed\n");
+ }
+ fd = create_dgram_sock(lock_path("messaging"), name, 0700);
+ SAFE_FREE(name);
if (fd < 0) {
smb_panic("Could not create dispatch socket\n");
}
More information about the samba-cvs
mailing list