summaryrefslogtreecommitdiff
path: root/source3/nmbd/nmbd_incomingdgrams.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/nmbd/nmbd_incomingdgrams.c')
-rw-r--r--source3/nmbd/nmbd_incomingdgrams.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/source3/nmbd/nmbd_incomingdgrams.c b/source3/nmbd/nmbd_incomingdgrams.c
index cd6954fc62..16fecbccd9 100644
--- a/source3/nmbd/nmbd_incomingdgrams.c
+++ b/source3/nmbd/nmbd_incomingdgrams.c
@@ -172,7 +172,7 @@ void process_host_announce(struct subnet_record *subrec, struct packet_struct *p
/* Update the record. */
servrec->serv.type = servertype|SV_TYPE_LOCAL_LIST_ONLY;
update_server_ttl( servrec, ttl);
- StrnCpy(servrec->serv.comment,comment,sizeof(servrec->serv.comment)-1);
+ fstrcpy(servrec->serv.comment,comment);
}
}
else
@@ -343,7 +343,7 @@ a local master browser for workgroup %s and we think we are master. Forcing elec
/* Update the record. */
servrec->serv.type = servertype|SV_TYPE_LOCAL_LIST_ONLY;
update_server_ttl(servrec, ttl);
- StrnCpy(servrec->serv.comment,comment,sizeof(servrec->serv.comment)-1);
+ fstrcpy(servrec->serv.comment,comment);
}
set_workgroup_local_master_browser_name( work, server_name );
@@ -520,7 +520,7 @@ originate from OS/2 Warp client. Ignoring packet.\n"));
/* Update the record. */
servrec->serv.type = servertype|SV_TYPE_LOCAL_LIST_ONLY;
update_server_ttl( servrec, ttl);
- StrnCpy(servrec->serv.comment,comment,sizeof(servrec->serv.comment)-1);
+ fstrcpy(servrec->serv.comment,comment);
}
}
else
@@ -559,6 +559,7 @@ static void send_backup_list_response(struct subnet_record *subrec,
#if 0
struct server_record *servrec;
#endif
+ fstring myname;
memset(outbuf,'\0',sizeof(outbuf));
@@ -578,8 +579,11 @@ static void send_backup_list_response(struct subnet_record *subrec,
/* We always return at least one name - our own. */
count = 1;
- StrnCpy(p,global_myname(),15);
- strupper(p);
+ fstrcpy(myname, global_myname());
+ strupper(myname);
+ myname[15]='\0';
+ push_pstring_base(p, myname, outbuf);
+
p = skip_string(p,1);
/* Look for backup browsers in this workgroup. */