mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
gnome: reqaccount: cleanup
This commit is contained in:
@ -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) {
|
||||
|
@ -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));
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user