The unified diff between revisions [6676c716..] and [1b553632..] is displayed below. It can also be downloaded as a raw diff.
This diff has been restricted to the following files: 'src/pconn.c'
#
#
# patch "src/pconn.c"
# from [5f83c46e535d572c2a6d6f55389e635926c3feee]
# to [8c9ab2458a98fedd3b53d1e42fdef52ea0235e66]
#
============================================================
--- src/pconn.c 5f83c46e535d572c2a6d6f55389e635926c3feee
+++ src/pconn.c 8c9ab2458a98fedd3b53d1e42fdef52ea0235e66
@@ -232,10 +232,7 @@ pconnPop(const char *peer, u_short port,
struct _pconn *p;
hash_link *hptr;
int fd = -1;
- LOCAL_ARRAY(char, key, PCONN_KEYLEN);
- assert(table != NULL);
- pconnKey(key, peer, port, client_address, client_port);
- hptr = hash_lookup(table, key);
+ hptr = pconnLookup( peer, port, client_address, client_port);
if (hptr != NULL) {
p = (struct _pconn *) hptr;
assert(p->nfds > 0);
@@ -247,6 +244,15 @@ pconnPop(const char *peer, u_short port,
return fd;
}
+hash_link *
+pconnLookup(const char *peer, u_short port, struct in_addr *client_address, u_short client_port)
+{
+ LOCAL_ARRAY(char, key, PCONN_KEYLEN);
+ assert(table != NULL);
+ pconnKey(key, peer, port, client_address, client_port);
+ return hash_lookup(table, key);
+}
+
void
pconnHistCount(int what, int i)
{