+2008-11-14 Neutron Soutmun <neo.neutron@gmail.com>
+
+ * src/rh-ipset.c:
+ Fixed the too many open files due to the uncleanly close sockets.
+ * src/rh-task-dbset.c:
+ Fixed the too many open temporary files due to unclosed connections.
+ * src/rh-xmlrpc-server.c:
+ Fixed the Session-Timeout handler which it does not set the session_timeout
+ in members data to 0 when the Session-Timeout is not set.
+
2008-11-12 Neutron Soutmun <neo.neutron@gmail.com>
* weblogin/logout.php: Substring the request url to shorten the line
if (res != 0)
DP("res=%d errno=%d", res, errno);
+ if (shutdown(sockfd, SHUT_RDWR) != 0)
+ syslog(LOG_ERR, "Failed shutdown() socket, errno=%d", errno);
+
if (close(sockfd) != 0)
syslog(LOG_ERR, "Failed close() socket, errno=%d", errno);
if (res != 0)
DP("res=%d errno=%d", res, errno);
+ if (shutdown(sockfd, SHUT_RDWR) != 0)
+ syslog(LOG_ERR, "Failed shutdown() socket, errno=%d", errno);
+
if (close(sockfd) != 0)
syslog(LOG_ERR, "Failed close() socket, errno=%d", errno);
free_data_list(data_list);
+ gda_client_close_all_connections (client);
+
g_object_unref(G_OBJECT(client));
return 0;
execute_sql(connection, startsess_cmd);
+ gda_client_close_all_connections (client);
+
g_object_unref(G_OBJECT(client));
return 0;
execute_sql(connection, stopsess_cmd);
+ gda_client_close_all_connections (client);
+
g_object_unref(G_OBJECT(client));
return 0;
req.session_id = session_id;
parse_mac(mac_address, ðernet);
memcpy(req.mac_address, ðernet, ETH_ALEN);
-
+ req.session_timeout = 0;
+
if (session_timeout != NULL) {
if (atol(session_timeout) != 0)
req.session_timeout = time(NULL) + atol(session_timeout);
}
- if (bandwidth_max_down != NULL) {
+ if (bandwidth_max_down != NULL)
req.bandwidth_max_down = atol(bandwidth_max_down);
-
- }
+ else
+ req.bandwidth_max_down = 0;
if (bandwidth_max_up != NULL)
req.bandwidth_max_up = atol(bandwidth_max_up);
+ else
+ req.bandwidth_max_up = 0;
rh_task_startsess(map, &req);