Subject: Re: libssh2 master 3420e98... use const to silence a bazillion warnings

Re: libssh2 master 3420e98... use const to silence a bazillion warnings

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 3 Mar 2010 09:46:18 +0100 (CET)

On Tue, 2 Mar 2010, Peter Stuge wrote:

> If we want to move to thread safe API I don't think that's enough, but it
> would be simple to optionally push it onto the caller.

Yes, and I say we can care about those details once we've defined exactly what
the thread safe API would be.

I suggest we change libssh2_error() to become something like this:

int libssh2_error(LIBSSH2_SESSION* session, int errcode, const char* msg,
                   ...)
{
    va_list ap;
    va_start(ap, msg);

    vsnprintf(session->err_msg_buffer, sizeof(session->err_msg_buffer), msg,
              ap);

    session->err_code = errcode;

    return errcode;
}

-- 
  / daniel.haxx.se
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-03-03