summaryrefslogtreecommitdiff
path: root/source3/nmbd/nmbd_incomingdgrams.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-11-19 15:15:09 -0800
committerJeremy Allison <jra@samba.org>2007-11-19 15:15:09 -0800
commit9a41314ce8582875e0ec59efb670279f39b42ce3 (patch)
tree8d32fb934b30f4080673338460029b489d4d6e2d /source3/nmbd/nmbd_incomingdgrams.c
parent551f9e7a6ccfefa48674f3b6a857485c60dfc2eb (diff)
downloadsamba-9a41314ce8582875e0ec59efb670279f39b42ce3.tar.gz
samba-9a41314ce8582875e0ec59efb670279f39b42ce3.tar.bz2
samba-9a41314ce8582875e0ec59efb670279f39b42ce3.zip
Remove pstring from nmbd.
Jeremy. (This used to be commit a317f70c229f7730279eaa323f7ebfd499257f76)
Diffstat (limited to 'source3/nmbd/nmbd_incomingdgrams.c')
-rw-r--r--source3/nmbd/nmbd_incomingdgrams.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/nmbd/nmbd_incomingdgrams.c b/source3/nmbd/nmbd_incomingdgrams.c
index 9fe344c39b..c0aa385ff6 100644
--- a/source3/nmbd/nmbd_incomingdgrams.c
+++ b/source3/nmbd/nmbd_incomingdgrams.c
@@ -534,13 +534,13 @@ done:
Send a backup list response.
*****************************************************************************/
-static void send_backup_list_response(struct subnet_record *subrec,
+static void send_backup_list_response(struct subnet_record *subrec,
struct work_record *work,
struct nmb_name *send_to_name,
unsigned char max_number_requested,
uint32 token, struct in_addr sendto_ip,
int port)
-{
+{
char outbuf[1024];
char *p, *countptr;
unsigned int count = 0;
@@ -554,9 +554,9 @@ static void send_backup_list_response(struct subnet_record *subrec,
DEBUG(3,("send_backup_list_response: sending backup list for workgroup %s to %s IP %s\n",
work->work_group, nmb_namestr(send_to_name), inet_ntoa(sendto_ip)));
-
+
p = outbuf;
-
+
SCVAL(p,0,ANN_GetBackupListResp); /* Backup list response opcode. */
p++;
@@ -565,13 +565,13 @@ static void send_backup_list_response(struct subnet_record *subrec,
SIVAL(p,0,token); /* The sender's unique info. */
p += 4;
-
+
/* We always return at least one name - our own. */
count = 1;
unstrcpy(myname, global_myname());
strupper_m(myname);
myname[15]='\0';
- push_pstring_base(p, myname, outbuf);
+ push_ascii(p, myname, sizeof(outbuf)-PTR_DIFF(p,outbuf)-1, STR_TERMINATE);
p = skip_string(outbuf,sizeof(outbuf),p);