summaryrefslogtreecommitdiff
path: root/source3/nmbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-01-11 19:10:25 +0000
committerJeremy Allison <jra@samba.org>2002-01-11 19:10:25 +0000
commitd6823366b881612234ab0655adb11c594f864c4a (patch)
tree325ac7bc1ac5aa03c28319501b891a99991357cf /source3/nmbd
parent27655be3c1708d447b046a2b0d8b2013eeb21835 (diff)
downloadsamba-d6823366b881612234ab0655adb11c594f864c4a.tar.gz
samba-d6823366b881612234ab0655adb11c594f864c4a.tar.bz2
samba-d6823366b881612234ab0655adb11c594f864c4a.zip
Same fix as went into 2.2 (I'm waiting for jerry to finish some code).
Jeremy. (This used to be commit 01ff6ce4963e1daff019f2b936cef218e1c93f67)
Diffstat (limited to 'source3/nmbd')
-rw-r--r--source3/nmbd/nmbd_browsesync.c2
-rw-r--r--source3/nmbd/nmbd_elections.c4
-rw-r--r--source3/nmbd/nmbd_packets.c2
-rw-r--r--source3/nmbd/nmbd_sendannounce.c22
4 files changed, 15 insertions, 15 deletions
diff --git a/source3/nmbd/nmbd_browsesync.c b/source3/nmbd/nmbd_browsesync.c
index 35bd29334e..40e04e7ecb 100644
--- a/source3/nmbd/nmbd_browsesync.c
+++ b/source3/nmbd/nmbd_browsesync.c
@@ -127,7 +127,7 @@ static void announce_local_master_browser_to_domain_master_browser( struct work_
memset(outbuf,'\0',sizeof(outbuf));
p = outbuf;
- CVAL(p,0) = ANN_MasterAnnouncement;
+ SCVAL(p,0,ANN_MasterAnnouncement);
p++;
StrnCpy(p,global_myname,15);
diff --git a/source3/nmbd/nmbd_elections.c b/source3/nmbd/nmbd_elections.c
index 6db595269f..ae22518495 100644
--- a/source3/nmbd/nmbd_elections.c
+++ b/source3/nmbd/nmbd_elections.c
@@ -44,10 +44,10 @@ static void send_election_dgram(struct subnet_record *subrec, char *workgroup_na
memset(outbuf,'\0',sizeof(outbuf));
p = outbuf;
- CVAL(p,0) = ANN_Election; /* Election opcode. */
+ SCVAL(p,0,ANN_Election); /* Election opcode. */
p++;
- CVAL(p,0) = (criterion == 0 && timeup == 0) ? 0 : ELECTION_VERSION;
+ SCVAL(p,0,((criterion == 0 && timeup == 0) ? 0 : ELECTION_VERSION));
SIVAL(p,1,criterion);
SIVAL(p,5,timeup*1000); /* ms - Despite what the spec says. */
p += 13;
diff --git a/source3/nmbd/nmbd_packets.c b/source3/nmbd/nmbd_packets.c
index ace4ddfa25..a81da0ca9b 100644
--- a/source3/nmbd/nmbd_packets.c
+++ b/source3/nmbd/nmbd_packets.c
@@ -1936,7 +1936,7 @@ BOOL send_mailslot(BOOL unique, char *mailslot,char *buf,int len,
set_message(ptr,17,17 + len,True);
memcpy(ptr,tmp,4);
- CVAL(ptr,smb_com) = SMBtrans;
+ SCVAL(ptr,smb_com,SMBtrans);
SSVAL(ptr,smb_vwv1,len);
SSVAL(ptr,smb_vwv11,len);
SSVAL(ptr,smb_vwv12,70 + strlen(mailslot));
diff --git a/source3/nmbd/nmbd_sendannounce.c b/source3/nmbd/nmbd_sendannounce.c
index 1f56dea882..ee3b3d110f 100644
--- a/source3/nmbd/nmbd_sendannounce.c
+++ b/source3/nmbd/nmbd_sendannounce.c
@@ -47,9 +47,9 @@ void send_browser_reset(int reset_type, char *to_name, int to_type, struct in_ad
memset(outbuf,'\0',sizeof(outbuf));
p = outbuf;
- CVAL(p,0) = ANN_ResetBrowserState;
+ SCVAL(p,0,ANN_ResetBrowserState);
p++;
- CVAL(p,0) = reset_type;
+ SCVAL(p,0,reset_type);
p++;
send_mailslot(True, BROWSE_MAILSLOT, outbuf,PTR_DIFF(p,outbuf),
@@ -74,10 +74,10 @@ to subnet %s\n", work->work_group, subrec->subnet_name));
memset(outbuf,'\0',sizeof(outbuf));
p = outbuf;
- CVAL(p,0) = ANN_AnnouncementRequest;
+ SCVAL(p,0,ANN_AnnouncementRequest);
p++;
- CVAL(p,0) = work->token; /* (local) Unique workgroup token id. */
+ SCVAL(p,0,work->token); /* (local) Unique workgroup token id. */
p++;
p += push_string(NULL, p+1, global_myname, 15, STR_ASCII|STR_UPPER|STR_TERMINATE);
@@ -101,16 +101,16 @@ static void send_announcement(struct subnet_record *subrec, int announce_type,
memset(outbuf,'\0',sizeof(outbuf));
p = outbuf+1;
- CVAL(outbuf,0) = announce_type;
+ SCVAL(outbuf,0,announce_type);
/* Announcement parameters. */
- CVAL(p,0) = updatecount;
+ SCVAL(p,0,updatecount);
SIVAL(p,1,announce_interval*1000); /* Milliseconds - despite the spec. */
push_string(NULL, p+5, server_name, 15, STR_ASCII|STR_UPPER|STR_TERMINATE);
- CVAL(p,21) = lp_major_announce_version(); /* Major version. */
- CVAL(p,22) = lp_minor_announce_version(); /* Minor version. */
+ SCVAL(p,21,lp_major_announce_version()); /* Major version. */
+ SCVAL(p,22,lp_minor_announce_version()); /* Minor version. */
SIVAL(p,23,server_type & ~SV_TYPE_LOCAL_LIST_ONLY);
/* Browse version: got from NT/AS 4.00 - Value defined in smb.h (JHT). */
@@ -140,8 +140,8 @@ static void send_lm_announcement(struct subnet_record *subrec, int announce_type
SSVAL(p,0,announce_type);
SIVAL(p,2,server_type & ~SV_TYPE_LOCAL_LIST_ONLY);
- CVAL(p,6) = lp_major_announce_version(); /* Major version. */
- CVAL(p,7) = lp_minor_announce_version(); /* Minor version. */
+ SCVAL(p,6,lp_major_announce_version()); /* Major version. */
+ SCVAL(p,7,lp_minor_announce_version()); /* Minor version. */
SSVAL(p,8,announce_interval); /* In seconds - according to spec. */
p += 10;
@@ -585,7 +585,7 @@ for workgroup %s on subnet %s.\n", global_myworkgroup, FIRST_SUBNET->subnet_name
memset(outbuf,'\0',sizeof(outbuf));
p = outbuf;
- CVAL(p,0) = ANN_MasterAnnouncement;
+ SCVAL(p,0,ANN_MasterAnnouncement);
p++;
StrnCpy(p,global_myname,15);