[epiphany/wip/sync] sync-service: Fix discards ‘const’ qualifier warning
- From: Gabriel Ivașcu <gabrielivascu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/wip/sync] sync-service: Fix discards ‘const’ qualifier warning
- Date: Tue, 7 Mar 2017 18:01:18 +0000 (UTC)
commit d2d055126c8639b29b8ac8e851de4b0a7beb8785
Author: Gabriel Ivascu <ivascu gabriel59 gmail com>
Date: Tue Mar 7 19:47:48 2017 +0200
sync-service: Fix discards ‘const’ qualifier warning
src/sync/ephy-sync-service.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/src/sync/ephy-sync-service.c b/src/sync/ephy-sync-service.c
index 3440b20..46323bf 100644
--- a/src/sync/ephy-sync-service.c
+++ b/src/sync/ephy-sync-service.c
@@ -85,7 +85,7 @@ static guint signals[LAST_SIGNAL];
typedef struct {
EphySyncService *service;
char *endpoint;
- const char *method;
+ char *method;
char *request_body;
double modified_since;
double unmodified_since;
@@ -108,9 +108,9 @@ typedef struct {
static void ephy_sync_service_send_next_storage_request (EphySyncService *self);
static StorageRequestAsyncData *
-storage_server_request_async_data_new (char *endpoint,
+storage_server_request_async_data_new (const char *endpoint,
const char *method,
- char *request_body,
+ const char *request_body,
double modified_since,
double unmodified_since,
SoupSessionCallback callback,
@@ -120,7 +120,7 @@ storage_server_request_async_data_new (char *endpoint,
data = g_slice_new (StorageRequestAsyncData);
data->endpoint = g_strdup (endpoint);
- data->method = method;
+ data->method = g_strdup (method);
data->request_body = g_strdup (request_body);
data->modified_since = modified_since;
data->unmodified_since = unmodified_since;
@@ -136,6 +136,7 @@ storage_server_request_async_data_free (StorageRequestAsyncData *data)
g_assert (data);
g_free (data->endpoint);
+ g_free (data->method);
g_free (data->request_body);
g_slice_free (StorageRequestAsyncData, data);
}
@@ -588,9 +589,9 @@ ephy_sync_service_send_next_storage_request (EphySyncService *self)
static void
ephy_sync_service_queue_storage_request (EphySyncService *self,
- char *endpoint,
+ const char *endpoint,
const char *method,
- char *request_body,
+ const char *request_body,
double modified_since,
double unmodified_since,
SoupSessionCallback callback,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]