[Commits] [SCM] claws branch, gtk2, updated. 3.19.0-30-gba6663478

paul at claws-mail.org paul at claws-mail.org
Sat May 21 10:51:00 CEST 2022


The branch, gtk2 has been updated
       via  ba6663478a91b77f6b8a65dc81d0ef88fbf80f40 (commit)
       via  632c8153e5acdef0bff13f15c75a4583a1262f83 (commit)
       via  82234481f8c57580dabaecc38f95ee35c6b4283f (commit)
      from  c9dfecbac45f35e7db7a4bb36ab5c7c7b3d3091a (commit)

Summary of changes:
 src/prefs_account.c | 56 +++++++++++++++++++++++++++--------------------------
 1 file changed, 29 insertions(+), 27 deletions(-)


- Log -----------------------------------------------------------------
commit ba6663478a91b77f6b8a65dc81d0ef88fbf80f40
Author: Michael Rasmussen <mir at datanom.net>
Date:   Sat May 21 10:03:12 2022 +0200

    fix CID 1504466
    
    Signed-off-by: Michael Rasmussen <mir at datanom.net>

diff --git a/src/prefs_account.c b/src/prefs_account.c
index e00e4546b..47e1ce514 100644
--- a/src/prefs_account.c
+++ b/src/prefs_account.c
@@ -6161,7 +6161,7 @@ static void * prefs_account_oauth2_listener(void * param)
 	struct BasicProtocol *protocol_optmenu = (struct BasicProtocol *)oauth2_page.protocol_optmenu;
 	GtkWidget *optmenu = protocol_optmenu->combobox;
 	Oauth2Service service;
-        OAUTH2Data *OAUTH2Data = g_malloc(sizeof(* OAUTH2Data));
+        OAUTH2Data *OAUTH2Data = NULL;
 
 	
 	//pthread_detach(pthread_self());
@@ -6223,6 +6223,7 @@ static void * prefs_account_oauth2_listener(void * param)
 		  gtk_widget_set_sensitive(oauth2_page.oauth2_authcode_entry, FALSE);
 		  gtk_widget_set_sensitive(oauth2_page.oauth2_authorise_btn, FALSE);
 		  
+                  OAUTH2Data = g_malloc(sizeof(* OAUTH2Data));
 		  oauth2_init (OAUTH2Data);
 		  
 		  OAUTH2Data->custom_client_secret = 

commit 632c8153e5acdef0bff13f15c75a4583a1262f83
Author: Michael Rasmussen <mir at datanom.net>
Date:   Sat May 21 10:31:59 2022 +0200

    fix CID 1504464
    
    Signed-off-by: Michael Rasmussen <mir at datanom.net>

diff --git a/src/prefs_account.c b/src/prefs_account.c
index ce8a38d77..e00e4546b 100644
--- a/src/prefs_account.c
+++ b/src/prefs_account.c
@@ -5184,8 +5184,8 @@ static void prefs_account_oauth2_copy_url(GtkButton *button, gpointer data)
 	}
 	debug_print("Starting oauth2 listener thread\n");
 	oauth2_listener_cancel = 0;
-	pthread_create(&oauth2_listener_tid, NULL, prefs_account_oauth2_listener, (void*)win);
-	
+	int ret = pthread_create(&oauth2_listener_tid, NULL, prefs_account_oauth2_listener, (void*)win);
+        cm_return_if_fail(ret != 0);
 }
 
 static void prefs_account_oauth2_obtain_tokens(GtkButton *button, gpointer data)
@@ -6304,28 +6304,28 @@ static int prefs_account_oauth2_get_line(int sock, char *buf, int size)
 	char c = '\0';
 	int n;
 	
-	while ((i < size - 1) && (c != '\n'))
-	  {
-	    n = recv(sock, &c, 1, 0);
-	    //printf("%02X\n", c);
-	    if (n > 0)
-	      {
-		if (c == '\r')
-		  {
-		    n = recv(sock, &c, 1, MSG_PEEK);
-		    //printf("%02X\n", c);
-		    if ((n > 0) && (c == '\n'))
-		      recv(sock, &c, 1, 0);
-		    else
-		      c = '\n';
-		  }
-		buf[i] = c;
-		i++;
-	      }
-	    else
-	      c = '\n';
-	  }
-	buf[i] = '\0';
-	
-	return(i);
+	while ((i < size - 1) && (c != '\n')) {
+                n = recv(sock, &c, 1, 0);
+                //printf("%02X\n", c);
+                if (n > 0) {
+                        if (c == '\r') {
+                                n = recv(sock, &c, 1, MSG_PEEK);
+                                //printf("%02X\n", c);
+                                if ((n > 0) && (c == '\n')) {
+                                        n = recv(sock, &c, 1, 0);
+                                        if (n < 0)
+                                               log_message(LOG_PROTOCOL, "Receiving from pipe failed\n"); 
+                                }
+                                else
+                                        c = '\n';
+                        }
+                        buf[i] = c;
+                        i++;
+                }
+                else
+                        c = '\n';
+        }
+        buf[i] = '\0';
+
+        return (i);
 }

commit 82234481f8c57580dabaecc38f95ee35c6b4283f
Author: Michael Rasmussen <mir at datanom.net>
Date:   Sat May 21 10:35:09 2022 +0200

    fix CID 1504463
    
    Signed-off-by: Michael Rasmussen <mir at datanom.net>

diff --git a/src/prefs_account.c b/src/prefs_account.c
index f117446bc..ce8a38d77 100644
--- a/src/prefs_account.c
+++ b/src/prefs_account.c
@@ -6184,6 +6184,7 @@ static void * prefs_account_oauth2_listener(void * param)
 	//Bind
 	if( bind(socket_desc,(struct sockaddr *)&server , sizeof(server)) < 0)
 	{
+                close(socket_desc);
 		debug_print("oauth2 listener bind failed\n");
 		return NULL;
 	}

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list