summaryrefslogtreecommitdiff
path: root/src/ua.c
diff options
context:
space:
mode:
authorJuha Heinanen <jh@tutpro.com>2015-06-25 22:10:24 +0300
committerJuha Heinanen <jh@tutpro.com>2015-06-25 22:10:24 +0300
commit7ea02318a1c15ad37e118784fd22695b9671dce9 (patch)
tree26e1fe38dda78ab2da055546e2635d50153c600f /src/ua.c
parent26d7041d297e98d9b4fb9f45c868bbb7a31c6582 (diff)
src/ua: skip initial white space from user given uri
Diffstat (limited to 'src/ua.c')
-rw-r--r--src/ua.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ua.c b/src/ua.c
index b6dab07..ccbb9f3 100644
--- a/src/ua.c
+++ b/src/ua.c
@@ -7,6 +7,7 @@
#include <re.h>
#include <baresip.h>
#include "core.h"
+#include <ctype.h>
/** Magic number */
@@ -606,6 +607,9 @@ static int uri_complete(struct ua *ua, struct mbuf *buf, const char *uri)
size_t len;
int err = 0;
+ /* Skip initial whitespace */
+ while (isspace(*uri)) uri++;
+
len = str_len(uri);
/* Append sip: scheme if missing */