providers/opm: It Works™

This commit is contained in:
Elizabeth Myers 2016-04-01 02:17:25 -05:00
parent 8aacefa338
commit 8860e46a33

View file

@ -123,15 +123,26 @@ read_opm_reply(rb_fde_t *F, void *data)
for(struct opm_proxy *proxy = opm_proxy_scans; proxy->note != NULL; proxy++)
{
if(strncmp(proxy->note, readbuf, sizeof(readbuf)) != 0)
/* Nope */
continue;
if(strncmp(proxy->note, readbuf, sizeof(readbuf)) == 0)
{
rb_dlink_node *ptr, *nptr;
/* Cancel outstanding lookups */
RB_DLINK_FOREACH_SAFE(ptr, nptr, lookup->scans.head)
{
struct opm_scan *scan = ptr->data;
rb_close(scan->F);
rb_free(scan);
}
/* No longer needed, client is going away */
rb_free(lookup);
/* If we get here we have an open proxy */
reject_client(auth, PROVIDER_OPM, readbuf, "Open proxy detected");
opm_cancel(auth);
break;
}
}
rb_close(F);
}