Skip to content

Commit

Permalink
Fix nameclash with NSAPI API
Browse files Browse the repository at this point in the history
  • Loading branch information
zsuraski committed Jul 28, 2003
1 parent fc8b10c commit 97662dc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions ext/mysql/libmysql/libmysql.c
Expand Up @@ -1510,7 +1510,7 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
/* without encryption? */
if (client_flag & CLIENT_SSL)
{
if (my_net_write(net,buff,(uint) (2)) || net_flush(net))
if (my_net_write(net,buff,(uint) (2)) || my_net_flush(net))
goto error;
/* Do the SSL layering. */
DBUG_PRINT("info", ("IO layer change in progress..."));
Expand Down Expand Up @@ -1543,7 +1543,7 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
mysql->db=my_strdup(db,MYF(MY_WME));
db=0;
}
if (my_net_write(net,buff,(uint) (end-buff)) || net_flush(net) ||
if (my_net_write(net,buff,(uint) (end-buff)) || my_net_flush(net) ||
net_safe_read(mysql) == packet_error)
goto error;
if (client_flag & CLIENT_COMPRESS) /* We will use compression */
Expand Down Expand Up @@ -1808,7 +1808,7 @@ send_file_to_server(MYSQL *mysql, const char *filename)
mysql->net.last_errno=EE_FILENOTFOUND;
sprintf(buf,EE(mysql->net.last_errno),tmp_name,errno);
strmake(mysql->net.last_error,buf,sizeof(mysql->net.last_error)-1);
my_net_write(&mysql->net,"",0); net_flush(&mysql->net);
my_net_write(&mysql->net,"",0); my_net_flush(&mysql->net);
my_free(tmp_name,MYF(0));
DBUG_RETURN(-1);
}
Expand All @@ -1827,7 +1827,7 @@ send_file_to_server(MYSQL *mysql, const char *filename)
}
(void) my_close(fd,MYF(0));
/* Send empty packet to mark end of file */
if (my_net_write(&mysql->net,"",0) || net_flush(&mysql->net))
if (my_net_write(&mysql->net,"",0) || my_net_flush(&mysql->net))
{
mysql->net.last_errno=CR_SERVER_LOST;
sprintf(mysql->net.last_error,ER(mysql->net.last_errno),socket_errno);
Expand Down
2 changes: 1 addition & 1 deletion ext/mysql/libmysql/mysql_com.h
Expand Up @@ -146,7 +146,7 @@ extern unsigned long net_buffer_length;
int my_net_init(NET *net, Vio* vio);
void net_end(NET *net);
void net_clear(NET *net);
int net_flush(NET *net);
int my_net_flush(NET *net);
int my_net_write(NET *net,const char *packet,unsigned long len);
int net_write_command(NET *net,unsigned char command,const char *packet,
unsigned long len);
Expand Down
6 changes: 3 additions & 3 deletions ext/mysql/libmysql/net.c
Expand Up @@ -183,10 +183,10 @@ void net_clear(NET *net)

/* Flush write_buffer if not empty. */

int net_flush(NET *net)
int my_net_flush(NET *net)
{
int error=0;
DBUG_ENTER("net_flush");
DBUG_ENTER("my_net_flush");
if (net->buff != net->write_pos)
{
error=net_real_write(net,(char*) net->buff,
Expand Down Expand Up @@ -231,7 +231,7 @@ net_write_command(NET *net,uchar command,const char *packet,ulong len)
buff[4]=command;
if (net_write_buff(net,(char*) buff,5))
return 1;
return test(net_write_buff(net,packet,len) || net_flush(net));
return test(net_write_buff(net,packet,len) || my_net_flush(net));
}


Expand Down

0 comments on commit 97662dc

Please sign in to comment.