summaryrefslogtreecommitdiff
path: root/source3/libsmb/nmblib.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1996-05-31 15:13:29 +0000
committerAndrew Tridgell <tridge@samba.org>1996-05-31 15:13:29 +0000
commit58734631b4233ec08b7a262587e400792f31f185 (patch)
tree960d8520ca847203a89aee2ae9e7cd362d9d7730 /source3/libsmb/nmblib.c
parent26e045daff2762c3739609da19934aadc552cae8 (diff)
downloadsamba-58734631b4233ec08b7a262587e400792f31f185.tar.gz
samba-58734631b4233ec08b7a262587e400792f31f185.tar.bz2
samba-58734631b4233ec08b7a262587e400792f31f185.zip
Lots of changes!
- add faq info on NT printer handling - add "delete readonly" option to help rcs users - add stuff to man pages on new printer options - add "proxy name resolution" option - add "command string" -c option to smbclient (thanks Ken) - split time functions into time.c - rearrange the quotas stuff a bit and fix some bugs - complete rehash of the time handling code thanks to Paul Eggert - fix nmblookup output a bit - add plp print queue parsing from Bertrand Wallrich (This used to be commit 635b56f19c817527c52e9bbde31faa6a8a47777b)
Diffstat (limited to 'source3/libsmb/nmblib.c')
-rw-r--r--source3/libsmb/nmblib.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/source3/libsmb/nmblib.c b/source3/libsmb/nmblib.c
index 6743227173..1f78996156 100644
--- a/source3/libsmb/nmblib.c
+++ b/source3/libsmb/nmblib.c
@@ -625,16 +625,17 @@ static void interpret_node_status(char *p, char *master,char *rname)
char qname[17];
int type;
fstring flags;
+ int i;
*flags = 0;
StrnCpy(qname,p,15);
type = CVAL(p,15);
p += 16;
- if (p[0] & 0x80) strcat(flags,"<GROUP> ");
- if ((p[0] & 0x60) == 0) strcat(flags,"B ");
- if ((p[0] & 0x60) == 1) strcat(flags,"P ");
- if ((p[0] & 0x60) == 2) strcat(flags,"M ");
- if ((p[0] & 0x60) == 3) strcat(flags,"_ ");
+ strcat(flags, (p[0] & 0x80) ? "<GROUP> " : " ");
+ if ((p[0] & 0x60) == 0x00) strcat(flags,"B ");
+ if ((p[0] & 0x60) == 0x20) strcat(flags,"P ");
+ if ((p[0] & 0x60) == 0x40) strcat(flags,"M ");
+ if ((p[0] & 0x60) == 0x60) strcat(flags,"_ ");
if (p[0] & 0x10) strcat(flags,"<DEREGISTERING> ");
if (p[0] & 0x08) strcat(flags,"<CONFLICT> ");
if (p[0] & 0x04) strcat(flags,"<ACTIVE> ");
@@ -650,7 +651,10 @@ static void interpret_node_status(char *p, char *master,char *rname)
trim_string(rname,NULL," ");
}
- DEBUG(level,("\t%s (type=0x%x)\t%s\n",qname,type,flags));
+ for (i = strlen( qname) ; --i >= 0 ; ) {
+ if (!isprint(qname[i])) qname[i] = '.';
+ }
+ DEBUG(level,("\t%-15s <%02x> - %s\n",qname,type,flags));
p+=2;
}
DEBUG(level,("num_good_sends=%d num_good_receives=%d\n",