Ticket #2085: 2085-ftpfs.c-repl-deprecated-g_strup-by-g_ascii_strup.patch

File 2085-ftpfs.c-repl-deprecated-g_strup-by-g_ascii_strup.patch, 1.2 KB (added by vit_r, 15 years ago)

ftpfs.c-repl-deprecated-g_strup-by-g_ascii_strup.patch

  • lib/vfs/mc-vfs/ftpfs.c

    From 7315abf9e4c387c107013bd1d1bf7bd86a2a03a9 Mon Sep 17 00:00:00 2001
    From: Vit Rosin <vit_r@list.ru>
    Date: Sat, 6 Mar 2010 16:39:03 +0000
    Subject: [PATCH] ftpfs.c repl deprecated g_strup by g_ascii_strup
    
    ---
     lib/vfs/mc-vfs/ftpfs.c |   13 ++++++++-----
     1 files changed, 8 insertions(+), 5 deletions(-)
    
    diff --git a/lib/vfs/mc-vfs/ftpfs.c b/lib/vfs/mc-vfs/ftpfs.c
    index 93bfab6..f8dbd83 100644
    a b ftpfs_login_server (struct vfs_class *me, struct vfs_s_super *super, 
    501501    } else 
    502502        name = g_strdup (SUP.user); 
    503503 
    504     if (ftpfs_get_reply 
    505         (me, SUP.sock, reply_string, 
    506          sizeof (reply_string) - 1) == COMPLETE) { 
    507         g_strup (reply_string); 
    508         SUP.remote_is_amiga = strstr (reply_string, "AMIGA") != 0; 
     504    if (ftpfs_get_reply (me, SUP.sock, reply_string,  
     505                        sizeof (reply_string) - 1) == COMPLETE) { 
     506        char *repup_string; 
     507         
     508        repup_string = g_ascii_strup (reply_string, sizeof (reply_string) - 1); 
     509        SUP.remote_is_amiga = (strstr (repup_string, "AMIGA") != 0); 
     510        g_free (repup_string); 
     511         
    509512        if (MEDATA->logfile) { 
    510513            fprintf (MEDATA->logfile, "MC -- remote_is_amiga =  %d\n", 
    511514                     SUP.remote_is_amiga);