Missing UNIX -> DOS codepage conversion. Fix from Alexander Bokovoy <a.bokovoy@sam...
authorJeremy Allison <jra@samba.org>
Mon, 27 Oct 2003 20:09:15 +0000 (20:09 +0000)
committerJeremy Allison <jra@samba.org>
Mon, 27 Oct 2003 20:09:15 +0000 (20:09 +0000)
Jeremy.
(This used to be commit 8b9b635bd2759642c25fe0cea5eefbbe5af44193)

source3/smbd/lanman.c

index 30934d0b3a30a7ab1d43aa25d5f3d946c509e9e2..3ea6ab483be4226faf999b960e3ef11152a06125 100644 (file)
@@ -2346,15 +2346,15 @@ static BOOL api_RNetServerGetInfo(connection_struct *conn,uint16 vuid, char *par
       pstring comment;
       uint32 servertype= lp_default_server_announce();
 
-      pstrcpy(comment,string_truncate(lp_serverstring(), MAX_SERVER_STRING_LENGTH));
+      push_ascii(comment,lp_serverstring(), MAX_SERVER_STRING_LENGTH,STR_TERMINATE);
 
       if ((count=get_server_info(SV_TYPE_ALL,&servers,lp_workgroup()))>0) {
-       for (i=0;i<count;i++)
-         if (strequal(servers[i].name,local_machine))
-      {
+       for (i=0;i<count;i++) {
+         if (strequal(servers[i].name,local_machine)) {
            servertype = servers[i].type;
-           pstrcpy(comment,servers[i].comment);            
+           push_ascii(comment,servers[i].comment,sizeof(pstring),STR_TERMINATE);           
          }
+       }
       }
       SAFE_FREE(servers);