Ticket #1: obexftp-0.21-sharp.patch

File obexftp-0.21-sharp.patch, 1.8 kB (added by zany, 2 years ago)

obexftp-0.21-sharp.patch

  • apps/obexftp.c

    old new  
    134134static const char *fbs_uuid = UUID_FBS; 
    135135static const char *irmc_uuid = UUID_IRMC; 
    136136static const char *s45_uuid = UUID_S45; 
     137static const char *pcsoftware_uuid = UUID_PCSOFTWARE; 
    137138 
    138139/* parse UUID string to real bytes */ 
    139140static int parse_uuid(char *name, const char **uuid, int *uuid_len) 
     
    169170                if (uuid_len) *uuid_len = sizeof(UUID_S45); 
    170171                return sizeof(UUID_S45); 
    171172        } 
     173         
     174        if (!strncasecmp(name, "pcsoftware", 10) || !strncasecmp(name, "sharp", 5)) { 
     175                fprintf(stderr, "Using PCSOFTWARE uuid.\n"); 
     176                if (uuid) *uuid = pcsoftware_uuid; 
     177                if (uuid_len) *uuid_len = sizeof(UUID_PCSOFTWARE); 
     178                return sizeof(UUID_PCSOFTWARE); 
     179        } 
    172180 
    173181        return -1; 
    174182} 
     
    719727#endif 
    720728                                " -t, --tty <device>          connect to this tty using a custom transport\n" 
    721729                                " -n, --network <host>        connect to this host\n\n" 
    722                                 " -U, --uuid                  use given uuid (none, FBS, IRMC, S45)\n" 
     730                                " -U, --uuid                  use given uuid (none, FBS, IRMC, S45, SHARP)\n" 
    723731                                " -H, --noconn                suppress connection ids (no conn header)\n" 
    724732                                " -S, --nopath                dont use setpaths (use path as filename)\n\n" 
    725733                                " -c, --chdir <DIR>           chdir\n" 
  • obexftp/uuid.h

    old new  
    11#ifndef OBEXFTP_UUID_H 
    22#define OBEXFTP_UUID_H 
    33 
     4#define __UUID_PCSOFTWARE_bytes \ 
     5{ \ 
     6        0x50, 0x43, 0x53, 0x4f, 0x46, 0x54, 0x57, 0x41, 0x52, 0x45 \ 
     7} 
     8 
     9#define UUID_PCSOFTWARE ((const uint8_t []) __UUID_PCSOFTWARE_bytes) 
     10 
    411/* Folder Browsing service UUID */ 
    512/* F9EC7BC4-953C-11D2-984E-525400DC9E09 */