mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-28 00:29:21 +00:00
account_creator: disable regex on win32
This commit is contained in:
parent
8e3f9a337a
commit
2b012a60a0
1 changed files with 6 additions and 0 deletions
|
|
@ -19,7 +19,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
#include "account_creator.h"
|
||||
#include "private.h"
|
||||
#if !_WIN32
|
||||
#include "regex.h"
|
||||
#endif
|
||||
|
||||
BELLE_SIP_DECLARE_NO_IMPLEMENTED_INTERFACES(LinphoneAccountCreatorCbs);
|
||||
|
||||
|
|
@ -164,12 +166,16 @@ static LinphoneAccountCreatorStatus validate_uri(const char* username, const cha
|
|||
}
|
||||
|
||||
static bool_t is_matching_regex(const char *entry, const char* regex) {
|
||||
#if _WIN32
|
||||
return TRUE;
|
||||
#else
|
||||
regex_t regex_pattern;
|
||||
int res;
|
||||
regcomp(®ex_pattern, regex, 0);
|
||||
res = regexec(®ex_pattern, entry, 0, NULL, 0);
|
||||
regfree(®ex_pattern);
|
||||
return (res != REG_NOMATCH);
|
||||
#endif
|
||||
}
|
||||
|
||||
LinphoneAccountCreatorStatus linphone_account_creator_set_username(LinphoneAccountCreator *creator, const char *username) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue