void reset_server(char *name, int state, struct in_addr ip);
void tell_become_backup(void);
BOOL same_context(struct dgram_packet *dgram);
-BOOL listening_name(struct work_record *work, struct nmb_name *n);
-BOOL listening_type(struct packet_struct *p, int command);
void process_browse_packet(struct packet_struct *p,char *buf,int len);
/*The following definitions come from nmbd.c */
/* this is our domain/workgroup/server database */
extern struct subnet_record *subnetlist;
-/* machine comment for host announcements */
-extern pstring ServerComment;
-
extern int updatecount;
extern int workgroup_count;
pstring comment;
char *my_name;
- StrnCpy(comment, *ServerComment ? ServerComment : "NoComment", 43);
+ StrnCpy(comment, lp_serverstring(), 43);
my_name = *myname ? myname : "NoName";
(d = make_subnet(bcast_ip, mask_ip)))
{
struct work_record *w = find_workgroupstruct(d, name, add);
- extern pstring ServerComment;
if (!w) return NULL;
lmhosts server entries to local interfaces */
if (strequal(lp_workgroup(), name))
{
- add_server_entry(d,w,myname,w->ServerType,0,ServerComment,True);
+ add_server_entry(d,w,myname,w->ServerType,0,lp_serverstring(),True);
DEBUG(3,("Added server name entry %s at %s\n",
name,inet_ntoa(bcast_ip)));
}
extern struct in_addr ipzero;
extern struct in_addr ipgrp;
-/* machine comment for host announcements */
-extern pstring ServerComment;
-
/* here are my election parameters */
extern time_t StartupTime;
/* update our server status */
work->ServerType &= ~SV_TYPE_POTENTIAL_BROWSER;
- add_server_entry(d,work,myname,work->ServerType,0,ServerComment,True);
+ add_server_entry(d,work,myname,work->ServerType,0,lp_serverstring(),True);
/* add special browser name */
add_my_name_entry(d,MSBROWSE ,0x01,nb_type|NB_ACTIVE|NB_GROUP);
/* update our server status */
work->ServerType |= SV_TYPE_MASTER_BROWSER;
- add_server_entry(d,work,myname,work->ServerType,0,ServerComment,True);
+ add_server_entry(d,work,myname,work->ServerType,0,lp_serverstring(),True);
if (work->serverlist == NULL) /* no servers! */
{
if (lp_domain_logons())
{
work->ServerType |= SV_TYPE_DOMAIN_MEMBER;
- add_server_entry(d,work,myname,work->ServerType,0,ServerComment,True);
+ add_server_entry(d,work,myname,work->ServerType,0,lp_serverstring(),True);
}
/* add domain master name */
}
work->ServerType |= update_type;
- add_server_entry(d,work,myname,work->ServerType,0,ServerComment,True);
+ add_server_entry(d,work,myname,work->ServerType,0,lp_serverstring(),True);
for (d1 = subnetlist; d1; d1 = d1->next)
{
extern pstring scope;
extern pstring myname;
-extern pstring ServerComment;
extern struct in_addr ipzero;
extern struct in_addr ipgrp;
/* this is our domain/workgroup/server database */
extern struct subnet_record *subnetlist;
-/* machine comment for host announcements */
-extern pstring ServerComment;
-
extern int updatecount;
/* what server type are we currently */
/* are we running as a daemon ? */
static BOOL is_daemon = False;
-/* machine comment for host announcements */
-pstring ServerComment="";
-
/* what server type are we currently */
time_t StartupTime =0;
DEBUG(3,("Loaded hosts file\n"));
}
-
-
- if (!*ServerComment)
- strcpy(ServerComment,"Samba %v");
- string_sub(ServerComment,"%v",VERSION);
- string_sub(ServerComment,"%h",myhostname);
-
add_my_names();
if (strequal(lp_workgroup(),"*")) {