Changeset View
Changeset View
Standalone View
Standalone View
smb/kio_smb_auth.cpp
Show All 29 Lines | |||||
30 | ///////////////////////////////////////////////////////////////////////////// | 30 | ///////////////////////////////////////////////////////////////////////////// | ||
31 | 31 | | |||
32 | #include "kio_smb.h" | 32 | #include "kio_smb.h" | ||
33 | #include "kio_smb_internal.h" | 33 | #include "kio_smb_internal.h" | ||
34 | 34 | | |||
35 | #include <kconfig.h> | 35 | #include <kconfig.h> | ||
36 | #include <kconfiggroup.h> | 36 | #include <kconfiggroup.h> | ||
37 | #include <klocalizedstring.h> | 37 | #include <klocalizedstring.h> | ||
38 | #include <stdlib.h> | 38 | #include <cstdlib> | ||
39 | 39 | | |||
40 | // call for libsmbclient | 40 | // call for libsmbclient | ||
41 | //========================================================================== | 41 | //========================================================================== | ||
42 | void auth_smbc_get_data(SMBCCTX * context, | 42 | void auth_smbc_get_data(SMBCCTX * context, | ||
43 | const char *server,const char *share, | 43 | const char *server,const char *share, | ||
44 | char *workgroup, int wgmaxlen, | 44 | char *workgroup, int wgmaxlen, | ||
45 | char *username, int unmaxlen, | 45 | char *username, int unmaxlen, | ||
46 | char *password, int pwmaxlen) | 46 | char *password, int pwmaxlen) | ||
47 | //========================================================================== | 47 | //========================================================================== | ||
48 | { | 48 | { | ||
49 | if (context != nullptr) { | 49 | if (context != nullptr) { | ||
50 | #ifdef DEPRECATED_SMBC_INTERFACE | 50 | #ifdef DEPRECATED_SMBC_INTERFACE | ||
51 | SMBSlave *theSlave = (SMBSlave*) smbc_getOptionUserData(context); | 51 | auto *theSlave = static_cast<SMBSlave*>(smbc_getOptionUserData(context)); | ||
52 | #else | 52 | #else | ||
53 | SMBSlave *theSlave = (SMBSlave*)smbc_option_get(context, "user_data"); | 53 | auto *theSlave = static_cast<SMBSlave*>(smbc_option_get(context, "user_data")); | ||
54 | #endif | 54 | #endif | ||
55 | theSlave->auth_smbc_get_data(server, share, | 55 | theSlave->auth_smbc_get_data(server, share, | ||
56 | workgroup,wgmaxlen, | 56 | workgroup,wgmaxlen, | ||
57 | username, unmaxlen, | 57 | username, unmaxlen, | ||
58 | password, pwmaxlen); | 58 | password, pwmaxlen); | ||
59 | } | 59 | } | ||
60 | 60 | | |||
61 | } | 61 | } | ||
▲ Show 20 Lines • Show All 188 Lines • Show Last 20 Lines |