r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text
[abartlet/samba.git/.git] / source3 / libsmb / climessage.c
index 035088212c7a40e109f0be56aebddfd6d512a12b..252f2cd72534239e849c4be180e26d6f69fd1bb2 100644 (file)
@@ -5,7 +5,7 @@
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
    GNU General Public License for more details.
    
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-#define NO_SYSLOG
-
 #include "includes.h"
 
 
@@ -32,7 +29,7 @@ int cli_message_start_build(struct cli_state *cli, char *host, char *username)
 
        /* construct a SMBsendstrt command */
        memset(cli->outbuf,'\0',smb_size);
-       set_message(cli->outbuf,0,0,True);
+       set_message(NULL,cli->outbuf,0,0,True);
        SCVAL(cli->outbuf,smb_com,SMBsendstrt);
        SSVAL(cli->outbuf,smb_tid,cli->cnum);
        cli_setup_packet(cli);
@@ -77,7 +74,7 @@ int cli_message_text_build(struct cli_state *cli, char *msg, int len, int grp)
        char *p;
 
        memset(cli->outbuf,'\0',smb_size);
-       set_message(cli->outbuf,1,0,True);
+       set_message(NULL,cli->outbuf,1,0,True);
        SCVAL(cli->outbuf,smb_com,SMBsendtxt);
        SSVAL(cli->outbuf,smb_tid,cli->cnum);
        cli_setup_packet(cli);
@@ -87,7 +84,7 @@ int cli_message_text_build(struct cli_state *cli, char *msg, int len, int grp)
        p = smb_buf(cli->outbuf);
        *p++ = 1;
 
-       if ((lendos = convert_string_allocate(NULL,CH_UNIX, CH_DOS, msg,len, (void **) &msgdos)) < 0 || !msgdos) {
+       if ((lendos = (int)convert_string_allocate(NULL,CH_UNIX, CH_DOS, msg,len, (void **)(void *)&msgdos, True)) < 0 || !msgdos) {
                DEBUG(3,("Conversion failed, sending message in UNIX charset\n"));
                SSVAL(p, 0, len); p += 2;
                memcpy(p, msg, len);
@@ -127,7 +124,7 @@ int cli_message_end_build(struct cli_state *cli, int grp)
        char *p;
 
        memset(cli->outbuf,'\0',smb_size);
-       set_message(cli->outbuf,1,0,True);
+       set_message(NULL,cli->outbuf,1,0,True);
        SCVAL(cli->outbuf,smb_com,SMBsendend);
        SSVAL(cli->outbuf,smb_tid,cli->cnum);