summaryrefslogtreecommitdiff
path: root/source3/nmbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2011-05-05 14:22:11 -0700
committerJeremy Allison <jra@samba.org>2011-05-05 23:56:07 +0200
commit02af3075858814811bc30f03623eb6715f9b7a78 (patch)
tree10e10b4df41d6a8059ca136e76901f2a8af5bce4 /source3/nmbd
parente131c94ac1b06cc49b1c25717d3496dba8b0b3df (diff)
downloadsamba-02af3075858814811bc30f03623eb6715f9b7a78.tar.gz
samba-02af3075858814811bc30f03623eb6715f9b7a78.tar.bz2
samba-02af3075858814811bc30f03623eb6715f9b7a78.zip
More simple const fixes.
Diffstat (limited to 'source3/nmbd')
-rw-r--r--source3/nmbd/nmbd.c6
-rw-r--r--source3/nmbd/nmbd_packets.c10
-rw-r--r--source3/nmbd/nmbd_processlogon.c6
-rw-r--r--source3/nmbd/nmbd_subnetdb.c2
4 files changed, 12 insertions, 12 deletions
diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c
index f8108d9d52..d8a4b17a07 100644
--- a/source3/nmbd/nmbd.c
+++ b/source3/nmbd/nmbd.c
@@ -240,8 +240,8 @@ static void reload_interfaces(time_t t)
continue;
}
- ip = ((struct sockaddr_in *)(void *)&iface->ip)->sin_addr;
- nmask = ((struct sockaddr_in *)(void *)
+ ip = ((const struct sockaddr_in *)(const void *)&iface->ip)->sin_addr;
+ nmask = ((const struct sockaddr_in *)(const void *)
&iface->netmask)->sin_addr;
/*
@@ -250,7 +250,7 @@ static void reload_interfaces(time_t t)
* ignore it here. JRA.
*/
- if (is_loopback_addr((struct sockaddr *)(void *)&iface->ip)) {
+ if (is_loopback_addr((const struct sockaddr *)(const void *)&iface->ip)) {
DEBUG(2,("reload_interfaces: Ignoring loopback "
"interface %s\n",
print_sockaddr(str, sizeof(str), &iface->ip) ));
diff --git a/source3/nmbd/nmbd_packets.c b/source3/nmbd/nmbd_packets.c
index 36ec13f295..a93e79c908 100644
--- a/source3/nmbd/nmbd_packets.c
+++ b/source3/nmbd/nmbd_packets.c
@@ -1290,28 +1290,28 @@ packet sent to name %s from IP %s\n",
DEBUG(4,("process_dgram: datagram from %s to %s IP %s for %s of type %d len=%d\n",
nmb_namestr(&dgram->source_name),nmb_namestr(&dgram->dest_name),
- inet_ntoa(p->ip), smb_buf(buf),CVAL(buf2,0),len));
+ inet_ntoa(p->ip), smb_buf_const(buf),CVAL(buf2,0),len));
/* Datagram packet received for the browser mailslot */
- if (strequal(smb_buf(buf),BROWSE_MAILSLOT)) {
+ if (strequal(smb_buf_const(buf),BROWSE_MAILSLOT)) {
process_browse_packet(p,buf2,len);
return;
}
/* Datagram packet received for the LAN Manager mailslot */
- if (strequal(smb_buf(buf),LANMAN_MAILSLOT)) {
+ if (strequal(smb_buf_const(buf),LANMAN_MAILSLOT)) {
process_lanman_packet(p,buf2,len);
return;
}
/* Datagram packet received for the domain logon mailslot */
- if (strequal(smb_buf(buf),NET_LOGON_MAILSLOT)) {
+ if (strequal(smb_buf_const(buf),NET_LOGON_MAILSLOT)) {
process_logon_packet(p,buf2,len,NET_LOGON_MAILSLOT);
return;
}
/* Datagram packet received for the NT domain logon mailslot */
- if (strequal(smb_buf(buf),NT_LOGON_MAILSLOT)) {
+ if (strequal(smb_buf_const(buf),NT_LOGON_MAILSLOT)) {
process_logon_packet(p,buf2,len,NT_LOGON_MAILSLOT);
return;
}
diff --git a/source3/nmbd/nmbd_processlogon.c b/source3/nmbd/nmbd_processlogon.c
index 9bb1252a46..790e1c3ce1 100644
--- a/source3/nmbd/nmbd_processlogon.c
+++ b/source3/nmbd/nmbd_processlogon.c
@@ -157,7 +157,7 @@ static void nmbd_proxy_logon_done(struct tevent_req *subreq);
static void nmbd_proxy_logon(struct nmbd_proxy_logon_context *ctx,
struct in_addr local_ip,
struct packet_struct *p,
- uint8_t *buf,
+ const uint8_t *buf,
uint32_t len)
{
struct nmbd_proxy_logon_state *state;
@@ -328,7 +328,7 @@ void process_logon_packet(struct packet_struct *p, const char *buf,int len,
inet_ntoa(p->ip) ));
return;
}
- ip = ((struct sockaddr_in *)pss)->sin_addr;
+ ip = ((const struct sockaddr_in *)pss)->sin_addr;
if (!lp_domain_logons()) {
DEBUG(5,("process_logon_packet: Logon packet received from IP %s and domain \
@@ -459,7 +459,7 @@ logons are not enabled.\n", inet_ntoa(p->ip) ));
if (global_nmbd_proxy_logon) {
nmbd_proxy_logon(global_nmbd_proxy_logon,
- ip, p, (uint8_t *)buf, len);
+ ip, p, (const uint8_t *)buf, len);
return;
}
diff --git a/source3/nmbd/nmbd_subnetdb.c b/source3/nmbd/nmbd_subnetdb.c
index 3a60038dcd..666679a90b 100644
--- a/source3/nmbd/nmbd_subnetdb.c
+++ b/source3/nmbd/nmbd_subnetdb.c
@@ -296,7 +296,7 @@ bool create_subnets(void)
* ignore it here. JRA.
*/
- if (is_loopback_addr((struct sockaddr *)&iface->ip)) {
+ if (is_loopback_addr((const struct sockaddr *)&iface->ip)) {
DEBUG(2,("create_subnets: Ignoring loopback interface.\n" ));
continue;
}