diff --git a/gnome/src/config/assistant.c b/gnome/src/config/assistant.c index e4208db36..00e6a99e2 100644 --- a/gnome/src/config/assistant.c +++ b/gnome/src/config/assistant.c @@ -528,8 +528,7 @@ void prefill_sip(void) { if (use_sflphone_org) { char alias[300]; - char *email; - email = (char *) gtk_entry_get_text(GTK_ENTRY(wiz->mailbox)); + const char *email = gtk_entry_get_text(GTK_ENTRY(wiz->mailbox)); rest_account ra = get_rest_account(SFLPHONE_ORG_SERVER,email); if (ra.success) { diff --git a/gnome/src/config/reqaccount.c b/gnome/src/config/reqaccount.c index 4aa2b0f6a..23cb4478e 100644 --- a/gnome/src/config/reqaccount.c +++ b/gnome/src/config/reqaccount.c @@ -49,7 +49,8 @@ #include "sflphone_const.h" #include "reqaccount.h" -int req(char *host, int port, char request[], size_t request_size) +static int +req(const char *host, int port, char request[], size_t request_size) { int s; struct sockaddr_in servSockAddr; @@ -122,11 +123,11 @@ int req(char *host, int port, char request[], size_t request_size) return 0; } -rest_account get_rest_account(char *host,char *email) +rest_account +get_rest_account(const char *host, const char *email) { - char ret[4096]; - rest_account ra = {0,}; - bzero(ret, sizeof(ret)); + char ret[4096] = {0}; + rest_account ra = {0}; g_debug("HOST: %s", host); strcpy(ret,"GET /rest/accountcreator?email="); strncat(ret, email, sizeof(ret) - strlen(ret)); diff --git a/gnome/src/config/reqaccount.h b/gnome/src/config/reqaccount.h index ce3e5c098..5bb101d9d 100644 --- a/gnome/src/config/reqaccount.h +++ b/gnome/src/config/reqaccount.h @@ -35,4 +35,5 @@ typedef struct { char passwd[200]; } rest_account; -rest_account get_rest_account (char *host, char *email); +rest_account +get_rest_account(const char *host, const char *email);