summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Buchanan <jonathan.russ.buchanan@gmail.com>2020-08-27 16:02:17 -0400
committerJonathan Buchanan <jonathan.russ.buchanan@gmail.com>2020-08-27 16:02:17 -0400
commita3766e94489b0e02bcbf8ffb6695a3d29f4ca7ca (patch)
tree32a469d22cb7eb737e2013e28e6f97b0c859836e
parent49d74db2e9bd8418f15b560e36e1f27661f65361 (diff)
change uri structs to match conventions
-rw-r--r--src/include/gnunet_uri_lib.h8
-rw-r--r--src/util/test_uri.c8
-rw-r--r--src/util/uri.c6
3 files changed, 11 insertions, 11 deletions
diff --git a/src/include/gnunet_uri_lib.h b/src/include/gnunet_uri_lib.h
index e5f144591..d428bdd9a 100644
--- a/src/include/gnunet_uri_lib.h
+++ b/src/include/gnunet_uri_lib.h
@@ -31,7 +31,7 @@
* Note: to make sure that no strings are copied, the first slash "/" in the
* path will be used to null terminate the hostname if no port is supplied.
*/
-struct GNUNET_uri {
+struct GNUNET_Uri {
char *scheme; /* scheme, without ":" and "//" */
char *username; /* username, default: NULL */
char *password; /* password, default: NULL */
@@ -44,7 +44,7 @@ struct GNUNET_uri {
/* A struct to hold the query string parameter values. */
-struct GNUNET_uri_param {
+struct GNUNET_UriParam {
char *key;
char *val;
};
@@ -70,7 +70,7 @@ struct GNUNET_uri_param {
* Returns 0 on success, otherwise -1.
*/
int
-GNUNET_uri_parse (struct GNUNET_uri *url,
+GNUNET_uri_parse (struct GNUNET_Uri *url,
char *url_str);
@@ -115,7 +115,7 @@ GNUNET_uri_split_path (char *path,
int
GNUNET_uri_parse_query (char *query,
char delimiter,
- struct GNUNET_uri_param *params,
+ struct GNUNET_UriParam *params,
int max_params);
diff --git a/src/util/test_uri.c b/src/util/test_uri.c
index f9e38383a..7c8156648 100644
--- a/src/util/test_uri.c
+++ b/src/util/test_uri.c
@@ -84,7 +84,7 @@ static char *
test_parse_http_url_ok (void)
{
int rc;
- struct GNUNET_uri url;
+ struct GNUNET_Uri url;
char *url_string;
/* Minimal URL */
@@ -397,7 +397,7 @@ static char *
test_parse_http_rel_url_ok (void)
{
int rc;
- struct GNUNET_uri url;
+ struct GNUNET_Uri url;
char *url_string;
/* Minimal relative URL */
@@ -492,7 +492,7 @@ static char *
test_parse_url_fail (void)
{
int rc;
- struct GNUNET_uri url;
+ struct GNUNET_Uri url;
char *url_string;
/* Empty */
@@ -627,7 +627,7 @@ test_parse_query_ok (void)
{
int rc;
char *q;
- struct GNUNET_uri_param params[10];
+ struct GNUNET_UriParam params[10];
/* One param query */
q = strdup ("q=yes");
diff --git a/src/util/uri.c b/src/util/uri.c
index ba5c0f716..87101d7e1 100644
--- a/src/util/uri.c
+++ b/src/util/uri.c
@@ -156,14 +156,14 @@ find_path (char *str)
* Returns 0 on success, otherwise -1.
*/
int
-GNUNET_uri_parse (struct GNUNET_uri *url,
+GNUNET_uri_parse (struct GNUNET_Uri *url,
char *u)
{
if (NULL == url || NULL == u) {
return -1;
}
- memset(url, 0, sizeof (struct GNUNET_uri));
+ memset(url, 0, sizeof (struct GNUNET_Uri));
/* (Fragment) */
url->fragment = find_fragment (u);
@@ -311,7 +311,7 @@ GNUNET_uri_split_path (char *path,
int
GNUNET_uri_parse_query (char *query,
char delimiter,
- struct GNUNET_uri_param *params,
+ struct GNUNET_UriParam *params,
int max_params)
{
int i = 0;