Added strupper() function call to up-case the scope field in the
authorChristopher R. Hertel <crh@samba.org>
Tue, 14 Jul 1998 01:52:09 +0000 (01:52 +0000)
committerChristopher R. Hertel <crh@samba.org>
Tue, 14 Jul 1998 01:52:09 +0000 (01:52 +0000)
make_nmb_name() function.  Database lookups (eg. gdbm) will often use
byte-by-byte comparisons, so it is important that the case and padding
are correct.

Chris -)-----
(This used to be commit d64ca4250ff0df4ceffe49b7d462df699a6981b4)

source3/libsmb/nmblib.c

index 89b0fa7a9276c289038007b65ecf354035aef68a..66f85d40fd57ca975ed0286d78d5a2e186c4435d 100644 (file)
@@ -759,14 +759,15 @@ static int build_dgram(char *buf,struct packet_struct *p)
 
 /*******************************************************************
   build a nmb name
 ******************************************************************/
-void make_nmb_name(struct nmb_name *n,char *name,int type,char *this_scope)
*******************************************************************/
+void make_nmb_name( struct nmb_name *n, char *name, int type, char *this_scope )
 {
-  memset((char *)n, '\0', sizeof(struct nmb_name));
-  StrnCpy(n->name,name,15);
-  strupper(n->name);
+  memset( (char *)n, '\0', sizeof(struct nmb_name) );
+  StrnCpy( n->name, name, 15 );
+  strupper( n->name );
   n->name_type = (unsigned int)type & 0xFF;
-  StrnCpy(n->scope,this_scope,63);
+  StrnCpy( n->scope, this_scope, 63 );
+  strupper( n->scope );
 }
 
 /*******************************************************************