From 9a41314ce8582875e0ec59efb670279f39b42ce3 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 19 Nov 2007 15:15:09 -0800 Subject: Remove pstring from nmbd. Jeremy. (This used to be commit a317f70c229f7730279eaa323f7ebfd499257f76) --- source3/nmbd/nmbd_incomingdgrams.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'source3/nmbd/nmbd_incomingdgrams.c') 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); -- cgit