# HG changeset patch # User mas01cr # Date 1191419619 0 # Node ID caf4ec67ddaf5f5805a921c72273017bd829cf95 # Parent e128f58b0f08343b23ac58e365e0f573885bc712 Give in to expediency and use SO_REUSEADDR on the bind() call. (Allows test cases to be run in quick succession. Possibly allows other stuff, positive and negative.) diff -r e128f58b0f08 -r caf4ec67ddaf audioDB.cpp --- a/audioDB.cpp Wed Oct 03 13:53:01 2007 +0000 +++ b/audioDB.cpp Wed Oct 03 13:53:39 2007 +0000 @@ -2482,6 +2482,13 @@ struct soap soap; int m, s; // master and slave sockets soap_init(&soap); + // FIXME: largely this use of SO_REUSEADDR is to make writing (and + // running) test cases more convenient, so that multiple test runs + // in close succession don't fail because of a bin() error. + // Investigate whether there are any potential drawbacks in this, + // and also whether there's a better way to write the tests. -- + // CSR, 2007-10-03 + soap.bind_flags |= SO_REUSEADDR; m = soap_bind(&soap, NULL, port, 100); if (m < 0) soap_print_fault(&soap, stderr);