Question about server_info_update_pending

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Question about server_info_update_pending

Will Fiveash-2
Today I was looking through the ldap plugin code and I noticed that
there are references to a boolean variable, server_info_update_pending,
which I see only being set to FALSE in a couple places but never TRUE.
Is this variable ever used?
--
Will Fiveash
Oracle Solaris Software Engineer
_______________________________________________
krbdev mailing list             [hidden email]
https://mailman.mit.edu/mailman/listinfo/krbdev
Reply | Threaded
Open this post in threaded view
|

Re: Question about server_info_update_pending

Greg Hudson
On 06/26/2017 02:38 PM, Will Fiveash wrote:
> Today I was looking through the ldap plugin code and I noticed that
> there are references to a boolean variable, server_info_update_pending,
> which I see only being set to FALSE in a couple places but never TRUE.
> Is this variable ever used?

It doesn't look like it.  The only code that uses the field is inside
#ifdef ASYNC_BIND blocks, and we never define ASYNC_BIND.  So we could
get rid of all of that, I think.

_______________________________________________
krbdev mailing list             [hidden email]
https://mailman.mit.edu/mailman/listinfo/krbdev
Reply | Threaded
Open this post in threaded view
|

Re: Question about server_info_update_pending

Will Fiveash-2
On Mon, Jun 26, 2017 at 03:11:04PM -0400, Greg Hudson wrote:
> On 06/26/2017 02:38 PM, Will Fiveash wrote:
> > Today I was looking through the ldap plugin code and I noticed that
> > there are references to a boolean variable, server_info_update_pending,
> > which I see only being set to FALSE in a couple places but never TRUE.
> > Is this variable ever used?
>
> It doesn't look like it.  The only code that uses the field is inside
> #ifdef ASYNC_BIND blocks, and we never define ASYNC_BIND.  So we could
> get rid of all of that, I think.

That's what I suspected.  Thanks for checking on that.  Note:

typedef struct  _krb5_ldap_server_handle {
    int                              msgid;
    LDAP                             *ldap_handle;
    krb5_boolean                     server_info_update_pending; <<<<<
    krb5_ldap_server_info            *server_info;
    struct _krb5_ldap_server_handle  *next;
} krb5_ldap_server_handle;

So if you decide to remove the #ifdef ASYNC_BIND blocks and all
references to server_info_update_pending I suppose one concern is ABI
issues around krb5_ldap_server_handle.  I took a quick look and every
use of krb5_ldap_server_handle in the function declarations and all are
pointer args so it should be safe to remove the
server_info_update_pending field.

--
Will Fiveash
Oracle Solaris Software Engineer
_______________________________________________
krbdev mailing list             [hidden email]
https://mailman.mit.edu/mailman/listinfo/krbdev