summaryrefslogtreecommitdiff
path: root/source3/nmbd
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2009-03-17 14:04:43 +1100
committerAndrew Bartlett <abartlet@samba.org>2009-04-14 12:11:00 +1000
commit4786a493f70070dce6de4cbe488c9de1bdbb75ad (patch)
treea568260a9cf5d255674d0e31dddf4f5e3644e0da /source3/nmbd
parent41e4f12c482082d6e622d1fdc830e38853cdbd8b (diff)
downloadsamba-4786a493f70070dce6de4cbe488c9de1bdbb75ad.tar.gz
samba-4786a493f70070dce6de4cbe488c9de1bdbb75ad.tar.bz2
samba-4786a493f70070dce6de4cbe488c9de1bdbb75ad.zip
Solve some of the conflict between Samba3 and Samba4 push_string
This renames push_string in Samba3 into push_string_base and push_string_check for the two different use cases. This should allow push_string to be imported from Samba4, using it's calling conventions.
Diffstat (limited to 'source3/nmbd')
-rw-r--r--source3/nmbd/nmbd_sendannounce.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/nmbd/nmbd_sendannounce.c b/source3/nmbd/nmbd_sendannounce.c
index d5a7ba58fd..8eb1da7d38 100644
--- a/source3/nmbd/nmbd_sendannounce.c
+++ b/source3/nmbd/nmbd_sendannounce.c
@@ -74,7 +74,7 @@ to subnet %s\n", work->work_group, subrec->subnet_name));
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);
+ p += push_string_check(p+1, global_myname(), 15, STR_ASCII|STR_UPPER|STR_TERMINATE);
send_mailslot(False, BROWSE_MAILSLOT, outbuf,PTR_DIFF(p,outbuf),
global_myname(), 0x0, work->work_group,0x1e, subrec->bcast_ip,
@@ -105,7 +105,7 @@ static void send_announcement(struct subnet_record *subrec, int announce_type,
safe_strcpy(upper_server_name, server_name, sizeof(upper_server_name)-1);
strupper_m(upper_server_name);
- push_string(NULL, p+5, upper_server_name, 16, STR_ASCII|STR_TERMINATE);
+ push_string_check(p+5, upper_server_name, 16, STR_ASCII|STR_TERMINATE);
SCVAL(p,21,lp_major_announce_version()); /* Major version. */
SCVAL(p,22,lp_minor_announce_version()); /* Minor version. */
@@ -115,7 +115,7 @@ static void send_announcement(struct subnet_record *subrec, int announce_type,
SSVAL(p,27,BROWSER_ELECTION_VERSION);
SSVAL(p,29,BROWSER_CONSTANT); /* Browse signature. */
- p += 31 + push_string(NULL, p+31, server_comment, sizeof(outbuf) - (p + 31 - outbuf), STR_ASCII|STR_TERMINATE);
+ p += 31 + push_string_check(p+31, server_comment, sizeof(outbuf) - (p + 31 - outbuf), STR_ASCII|STR_TERMINATE);
send_mailslot(False,BROWSE_MAILSLOT, outbuf, PTR_DIFF(p,outbuf),
from_name, 0x0, to_name, to_type, to_ip, subrec->myip,
@@ -143,8 +143,8 @@ static void send_lm_announcement(struct subnet_record *subrec, int announce_type
SSVAL(p,8,announce_interval); /* In seconds - according to spec. */
p += 10;
- p += push_string(NULL, p, server_name, 15, STR_ASCII|STR_UPPER|STR_TERMINATE);
- p += push_string(NULL, p, server_comment, sizeof(outbuf)- (p - outbuf), STR_ASCII|STR_UPPER|STR_TERMINATE);
+ p += push_string_check(p, server_name, 15, STR_ASCII|STR_UPPER|STR_TERMINATE);
+ p += push_string_check(p, server_comment, sizeof(outbuf)- (p - outbuf), STR_ASCII|STR_UPPER|STR_TERMINATE);
send_mailslot(False,LANMAN_MAILSLOT, outbuf, PTR_DIFF(p,outbuf),
from_name, 0x0, to_name, to_type, to_ip, subrec->myip,