/* 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..."));
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 */
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);
}
}
(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);
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);
/* 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,
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));
}