/[LeafOK_CVS]/lbbs/src/main.c
ViewVC logotype

Diff of /lbbs/src/main.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.59 by sysadm, Wed Jun 25 01:50:14 2025 UTC Revision 1.61 by sysadm, Wed Jul 16 05:46:17 2025 UTC
# Line 128  int main(int argc, char *argv[]) Line 128  int main(int argc, char *argv[])
128          strncpy(file_path_temp, argv[0], sizeof(file_path_temp) - 1);          strncpy(file_path_temp, argv[0], sizeof(file_path_temp) - 1);
129          file_path_temp[sizeof(file_path_temp) - 1] = '\0';          file_path_temp[sizeof(file_path_temp) - 1] = '\0';
130    
131          chdir(dirname(file_path_temp));          if (chdir(dirname(file_path_temp)) < 0)
132          chdir("..");          {
133                    fprintf(stderr, "chdir(%s) error: %d\n", dirname(file_path_temp), errno);
134                    return -1;
135            }
136            if (chdir("..") < 0)
137            {
138                    fprintf(stderr, "chdir(..) error: %d\n", errno);
139                    return -1;
140            }
141    
142          // Initialize log          // Initialize log
143          if (log_begin(LOG_FILE_INFO, LOG_FILE_ERROR) < 0)          if (log_begin(LOG_FILE_INFO, LOG_FILE_ERROR) < 0)
# Line 224  int main(int argc, char *argv[]) Line 232  int main(int argc, char *argv[])
232                  }                  }
233          }          }
234    
235          // Load section config          // Load section config and gen_ex
236          if (load_section_config_from_db(0) < 0)          if (load_section_config_from_db(1) < 0)
237          {          {
238                  log_error("load_section_config_from_db() error\n");                  log_error("load_section_config_from_db(0) error\n");
239                  goto cleanup;                  goto cleanup;
240          }          }
241    


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1