Ignore:
Timestamp:
Jun 28, 2011, 6:49:53 PM (14 years ago)
Author:
Silvan Scherrer
Message:

samba server 3.3: reworked os2_getexename()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.3.x/source/lib/os2helper.c

    r482 r585  
    9696
    9797// get the exe name (including path)
    98 bool os2_GetExeName(char *sExeName)
     98bool os2_GetExeName(char *sExeName, int lExeName)
    9999{
    100100        APIRET rc = NO_ERROR;
     
    109109
    110110        // with the module name we get the path (including the exe name)
    111         rc = DosQueryModuleName(ppib->pib_hmte, sizeof(sExeName), sExeName);
     111        rc = DosQueryModuleName(ppib->pib_hmte, lExeName, sExeName);
    112112        if (rc != NO_ERROR)
    113113        {
     
    123123        char sDrive [_MAX_PATH], sDir [_MAX_DIR];
    124124
    125         if (!os2_GetExeName(sExeName))
     125        if (!os2_GetExeName(sExeName, sizeof(sExeName)))
    126126                return false;
    127127
     
    132132        strcpy(buff, sDrive);
    133133
    134         return 0;
     134        return true;
    135135}
    136136
     
    141141        char sDrive [_MAX_PATH], sDir [_MAX_DIR], sName[_MAX_PATH];
    142142
    143         if (!os2_GetExeName(sExeName))
     143        if (!os2_GetExeName(sExeName, sizeof(sExeName)))
    144144                return false;
    145145
Note: See TracChangeset for help on using the changeset viewer.