<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    I did notice __sws_debug, but in the sample it is used in swslib.c.
    From what I understand I need to be able to read it in main.c in
    order to limit the connections that are accepted in mainloop. So for
    example, in main.c I have:<br>
    <br>
    if (__sws_debug == 1)<br>
                    max_connections = 1;<br>
            else<br>
                    max_connections = 10;<br>
    <br>
    But gcc will error with<br>
    main.c:62:6: error: â__sws_debugâ undeclared (first use in this
    function)<br>
    <br>
    Since __sws_debug is declared in the source file.<br>
    <br>
    Sorry if I'm missing something really obvious.<br>
    <br>
    -Rob<br>
    <br>
    On 11/9/2011 10:13 PM, Jan Schaumann wrote:
    <blockquote cite="mid:20111110031311.GD29557@netmeister.org"
      type="cite">
      <pre wrap="">Rob Hoffmann <a class="moz-txt-link-rfc2396E" href="mailto:rhoffman@stevens.edu"><rhoffman@stevens.edu></a> wrote:

</pre>
      <blockquote type="cite">
        <pre wrap="">Would it be alright if I was to either pass the options to the mainloop  
or make it a global variable, or move the sws globals from swslib.c to  
the header file?
</pre>
      </blockquote>
      <pre wrap="">
The struct swsopts is passed to sws_init(), which can set "globals" in
the "library" (as the sample implementation does).

The example provided then makes use of the __sws_debug variable to
identify whether or not it's running in debug mode or not.

So unless I messed up the example (which is of course entirely
possible), you should be able to pass information via sws_init
sufficiently.

-Jan
</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
cs631apue mailing list
<a class="moz-txt-link-abbreviated" href="mailto:cs631apue@lists.stevens.edu">cs631apue@lists.stevens.edu</a>
<a class="moz-txt-link-freetext" href="https://lists.stevens.edu/cgi-bin/mailman/listinfo/cs631apue">https://lists.stevens.edu/cgi-bin/mailman/listinfo/cs631apue</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>