Changeset 585 for branches


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

samba server 3.3: reworked os2_getexename()

Location:
branches/samba-3.3.x/source
Files:
2 edited

Legend:

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

    r482 r585  
    110110        {
    111111                char exedir[1024] = "";
    112                 if (os2_GetExePath(exedir) != 0)
     112                if (!os2_GetExePath(exedir))
    113113                {
    114114                        snprintf(buffer, 260, "%s", SBINDIR);
     
    131131        {
    132132                char exedir[1024] = "";
    133                 if (os2_GetExePath(exedir) != 0)
     133                if (!os2_GetExePath(exedir))
    134134                {
    135135                        snprintf(buffer, 260, "%s", BINDIR);
     
    152152        {
    153153                char exedir[1024] = "";
    154                 if (os2_GetExePath(exedir) != 0)
     154                if (!os2_GetExePath(exedir))
    155155                {
    156156                        snprintf(buffer, 260, "%s", SWATDIR);
     
    233233        {
    234234                char exedir[1024] = "";
    235                 if (os2_GetExePath(exedir) != 0)
     235                if (!os2_GetExePath(exedir))
    236236                {
    237237                        snprintf(buffer, 260, "%s", CODEPAGEDIR);
     
    254254        {
    255255                char exedir[1024] = "";
    256                 if (os2_GetExePath(exedir) != 0)
     256                if (!os2_GetExePath(exedir))
    257257                {
    258258                        snprintf(buffer, 260, "%s", LIBDIR);
     
    275275        {
    276276                char exedir[1024] = "";
    277                 if (os2_GetExePath(exedir) != 0)
     277                if (!os2_GetExePath(exedir))
    278278                {
    279279                        snprintf(buffer, 260, "%s", MODULESDIR);
     
    357357        {
    358358                char exedir[1024] = "";
    359                 if (os2_GetExePath(exedir) != 0)
     359                if (!os2_GetExePath(exedir))
    360360                {
    361361                        snprintf(buffer, 260, "%s", LIBDIR);
  • 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.