Author: wyoung
Date: Fri Jan 11 00:00:15 2008
New Revision: 2114
URL: http://svn.gna.org/viewcvs/mysqlpp?rev=2114&view=rev
Log:
Fixed a bug with non-default port numbers passed separately from server
spec. It was getting zeroed incorrectly. Fix by Bart Verstraete.
Modified:
trunk/lib/tcp_connection.cpp
Modified: trunk/lib/tcp_connection.cpp
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/tcp_connection.cpp?rev=2114&r1=2113&r2=2114&view=diff
==============================================================================
--- trunk/lib/tcp_connection.cpp (original)
+++ trunk/lib/tcp_connection.cpp Fri Jan 11 00:00:15 2008
@@ -112,11 +112,10 @@
}
}
- // Turn service into a port number
- if (service.empty()) {
- port = 0;
- }
- else {
+ // Turn service into a port number, if it was given. If not, don't
+ // overwrite port because it could have a legal value passed in from
+ // Connection.
+ if (!service.empty()) {
if (isdigit(service[0])) {
port = atoi(service.c_str());
if ((port < 1) || (port > USHRT_MAX)) {
_______________________________________________
Mysqlpp-commits mailing list
[email protected]
https://mail.gna.org/listinfo/mysqlpp-commits