mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
ldap/imap: Fixed spelling mistake in comments and variable names
Reported-by: Michael Osipov
This commit is contained in:
parent
c07857e063
commit
4626f31d0e
@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@ -2447,7 +2447,7 @@ static char *imap_atom(const char *str)
|
|||||||
if(!str)
|
if(!str)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
/* Count any unescapped characters */
|
/* Count any unescaped characters */
|
||||||
p1 = str;
|
p1 = str;
|
||||||
while(*p1) {
|
while(*p1) {
|
||||||
if(*p1 == '\\')
|
if(*p1 == '\\')
|
||||||
@ -2460,7 +2460,7 @@ static char *imap_atom(const char *str)
|
|||||||
p1++;
|
p1++;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Does the input contain any unescapped characters? */
|
/* Does the input contain any unescaped characters? */
|
||||||
if(!backsp_count && !quote_count && !space_exists)
|
if(!backsp_count && !quote_count && !space_exists)
|
||||||
return strdup(str);
|
return strdup(str);
|
||||||
|
|
||||||
|
48
lib/ldap.c
48
lib/ldap.c
@ -733,24 +733,24 @@ static int _ldap_url_parse2 (const struct connectdata *conn, LDAPURLDesc *ludp)
|
|||||||
|
|
||||||
if(*p) {
|
if(*p) {
|
||||||
char *dn = p;
|
char *dn = p;
|
||||||
char *unescapped;
|
char *unescaped;
|
||||||
|
|
||||||
LDAP_TRACE (("DN '%s'\n", dn));
|
LDAP_TRACE (("DN '%s'\n", dn));
|
||||||
|
|
||||||
/* Unescape the DN */
|
/* Unescape the DN */
|
||||||
unescapped = curl_easy_unescape(conn->data, dn, 0, NULL);
|
unescaped = curl_easy_unescape(conn->data, dn, 0, NULL);
|
||||||
if(!unescapped) {
|
if(!unescaped) {
|
||||||
rc = LDAP_NO_MEMORY;
|
rc = LDAP_NO_MEMORY;
|
||||||
|
|
||||||
goto quit;
|
goto quit;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CURL_LDAP_WIN)
|
#if defined(CURL_LDAP_WIN)
|
||||||
/* Convert the unescapped string to a tchar */
|
/* Convert the unescaped string to a tchar */
|
||||||
ludp->lud_dn = Curl_convert_UTF8_to_tchar(unescapped);
|
ludp->lud_dn = Curl_convert_UTF8_to_tchar(unescaped);
|
||||||
|
|
||||||
/* Free the unescapped string as we are done with it */
|
/* Free the unescaped string as we are done with it */
|
||||||
Curl_unicodefree(unescapped);
|
Curl_unicodefree(unescaped);
|
||||||
|
|
||||||
if(!ludp->lud_dn) {
|
if(!ludp->lud_dn) {
|
||||||
rc = LDAP_NO_MEMORY;
|
rc = LDAP_NO_MEMORY;
|
||||||
@ -758,7 +758,7 @@ static int _ldap_url_parse2 (const struct connectdata *conn, LDAPURLDesc *ludp)
|
|||||||
goto quit;
|
goto quit;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
ludp->lud_dn = unescapped;
|
ludp->lud_dn = unescaped;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -797,13 +797,13 @@ static int _ldap_url_parse2 (const struct connectdata *conn, LDAPURLDesc *ludp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
for(i = 0; i < count; i++) {
|
for(i = 0; i < count; i++) {
|
||||||
char *unescapped;
|
char *unescaped;
|
||||||
|
|
||||||
LDAP_TRACE (("attr[%d] '%s'\n", i, attributes[i]));
|
LDAP_TRACE (("attr[%d] '%s'\n", i, attributes[i]));
|
||||||
|
|
||||||
/* Unescape the attribute */
|
/* Unescape the attribute */
|
||||||
unescapped = curl_easy_unescape(conn->data, attributes[i], 0, NULL);
|
unescaped = curl_easy_unescape(conn->data, attributes[i], 0, NULL);
|
||||||
if(!unescapped) {
|
if(!unescaped) {
|
||||||
Curl_safefree(attributes);
|
Curl_safefree(attributes);
|
||||||
|
|
||||||
rc = LDAP_NO_MEMORY;
|
rc = LDAP_NO_MEMORY;
|
||||||
@ -812,11 +812,11 @@ static int _ldap_url_parse2 (const struct connectdata *conn, LDAPURLDesc *ludp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CURL_LDAP_WIN)
|
#if defined(CURL_LDAP_WIN)
|
||||||
/* Convert the unescapped string to a tchar */
|
/* Convert the unescaped string to a tchar */
|
||||||
ludp->lud_attrs[i] = Curl_convert_UTF8_to_tchar(unescapped);
|
ludp->lud_attrs[i] = Curl_convert_UTF8_to_tchar(unescaped);
|
||||||
|
|
||||||
/* Free the unescapped string as we are done with it */
|
/* Free the unescaped string as we are done with it */
|
||||||
Curl_unicodefree(unescapped);
|
Curl_unicodefree(unescaped);
|
||||||
|
|
||||||
if(!ludp->lud_attrs[i]) {
|
if(!ludp->lud_attrs[i]) {
|
||||||
Curl_safefree(attributes);
|
Curl_safefree(attributes);
|
||||||
@ -826,7 +826,7 @@ static int _ldap_url_parse2 (const struct connectdata *conn, LDAPURLDesc *ludp)
|
|||||||
goto quit;
|
goto quit;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
ludp->lud_attrs[i] = unescapped;
|
ludp->lud_attrs[i] = unescaped;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ludp->lud_attrs_dups++;
|
ludp->lud_attrs_dups++;
|
||||||
@ -865,24 +865,24 @@ static int _ldap_url_parse2 (const struct connectdata *conn, LDAPURLDesc *ludp)
|
|||||||
|
|
||||||
if(*p) {
|
if(*p) {
|
||||||
char *filter = p;
|
char *filter = p;
|
||||||
char *unescapped;
|
char *unescaped;
|
||||||
|
|
||||||
LDAP_TRACE (("filter '%s'\n", filter));
|
LDAP_TRACE (("filter '%s'\n", filter));
|
||||||
|
|
||||||
/* Unescape the filter */
|
/* Unescape the filter */
|
||||||
unescapped = curl_easy_unescape(conn->data, filter, 0, NULL);
|
unescaped = curl_easy_unescape(conn->data, filter, 0, NULL);
|
||||||
if(!unescapped) {
|
if(!unescaped) {
|
||||||
rc = LDAP_NO_MEMORY;
|
rc = LDAP_NO_MEMORY;
|
||||||
|
|
||||||
goto quit;
|
goto quit;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CURL_LDAP_WIN)
|
#if defined(CURL_LDAP_WIN)
|
||||||
/* Convert the unescapped string to a tchar */
|
/* Convert the unescaped string to a tchar */
|
||||||
ludp->lud_filter = Curl_convert_UTF8_to_tchar(unescapped);
|
ludp->lud_filter = Curl_convert_UTF8_to_tchar(unescaped);
|
||||||
|
|
||||||
/* Free the unescapped string as we are done with it */
|
/* Free the unescaped string as we are done with it */
|
||||||
Curl_unicodefree(unescapped);
|
Curl_unicodefree(unescaped);
|
||||||
|
|
||||||
if(!ludp->lud_filter) {
|
if(!ludp->lud_filter) {
|
||||||
rc = LDAP_NO_MEMORY;
|
rc = LDAP_NO_MEMORY;
|
||||||
@ -890,7 +890,7 @@ static int _ldap_url_parse2 (const struct connectdata *conn, LDAPURLDesc *ludp)
|
|||||||
goto quit;
|
goto quit;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
ludp->lud_filter = unescapped;
|
ludp->lud_filter = unescaped;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user