diff options
Diffstat (limited to 'libmysql/manager.c')
-rw-r--r-- | libmysql/manager.c | 41 |
1 files changed, 18 insertions, 23 deletions
diff --git a/libmysql/manager.c b/libmysql/manager.c index a1262a46754..fbf0a0b2c22 100644 --- a/libmysql/manager.c +++ b/libmysql/manager.c @@ -1,19 +1,18 @@ -/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, +/* Copyright (C) 2000 MySQL AB + + 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 + (at your option) any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - MA 02111-1307, USA */ + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include <my_global.h> #if defined(THREAD) @@ -101,7 +100,7 @@ MYSQL_MANAGER* STDCALL mysql_manager_connect(MYSQL_MANAGER* con, user="root"; if (!passwd) passwd=""; - + if ((sock=(my_socket)socket(AF_INET,SOCK_STREAM,0)) == SOCKET_ERROR) { con->last_errno=errno; @@ -241,14 +240,14 @@ int STDCALL mysql_manager_fetch_line(MYSQL_MANAGER* con, char* res_buf, char* net_buf=(char*) con->net.read_pos, *net_buf_end; int res_buf_shift=RES_BUF_SHIFT; uint num_bytes; - + if (res_buf_size<RES_BUF_SHIFT) { con->last_errno=ENOMEM; strmov(con->last_error,"Result buffer too small"); return 1; } - + if ((num_bytes=my_net_read(&con->net)) == packet_error) { con->last_errno=errno; @@ -257,7 +256,7 @@ int STDCALL mysql_manager_fetch_line(MYSQL_MANAGER* con, char* res_buf, } net_buf_end=net_buf+num_bytes; - + if ((con->eof=(net_buf[3]==' '))) res_buf_shift--; net_buf+=res_buf_shift; @@ -272,7 +271,3 @@ int STDCALL mysql_manager_fetch_line(MYSQL_MANAGER* con, char* res_buf, } return 0; } - - - - |